diff --git a/libraries/lib-audio-io/AudioIO.cpp b/libraries/lib-audio-io/AudioIO.cpp index db8cd9cf8..1c38afc53 100644 --- a/libraries/lib-audio-io/AudioIO.cpp +++ b/libraries/lib-audio-io/AudioIO.cpp @@ -134,7 +134,7 @@ struct AudioIoCallback::TransportState { // Setup for realtime playback at the rate of the realtime // stream, not the rate of the sample sequence. mpRealtimeInitialization.emplace( - move(wOwningProject), sampleRate, numPlaybackChannels); + std::move(wOwningProject), sampleRate, numPlaybackChannels); // The following adds a new effect processor for each logical sequence. for (size_t i = 0, cnt = playbackSequences.size(); i < cnt; ++i) { // An array only of non-null pointers should be given to us @@ -1049,7 +1049,7 @@ void AudioIO::CallAfterRecording(PostRecordingAction action) // Don't delay it except until idle time. // (Recording might start between now and then, but won't go far before // the action is done. So the system isn't bulletproof yet.) - BasicUI::CallAfter(move(action)); + BasicUI::CallAfter(std::move(action)); } bool AudioIO::AllocateBuffers( @@ -2986,7 +2986,7 @@ AudioIoCallback::AudioIoCallback() auto &factories = AudioIOExt::GetFactories(); for (auto &factory: factories) if (auto pExt = factory(mPlaybackSchedule)) - mAudioIOExt.push_back( move(pExt) ); + mAudioIOExt.push_back( std::move(pExt) ); } diff --git a/libraries/lib-audio-io/AudioIOExt.cpp b/libraries/lib-audio-io/AudioIOExt.cpp index dcae2323d..37515bed9 100644 --- a/libraries/lib-audio-io/AudioIOExt.cpp +++ b/libraries/lib-audio-io/AudioIOExt.cpp @@ -20,7 +20,7 @@ auto AudioIOExt::GetFactories() -> Factories & AudioIOExt::RegisteredFactory::RegisteredFactory(Factory factory) { - GetFactories().push_back( move(factory) ); + GetFactories().push_back( std::move(factory) ); } AudioIOExt::RegisteredFactory::~RegisteredFactory() diff --git a/libraries/lib-audio-unit/AudioUnitInstance.cpp b/libraries/lib-audio-unit/AudioUnitInstance.cpp index 587317180..0f3d976f8 100644 --- a/libraries/lib-audio-unit/AudioUnitInstance.cpp +++ b/libraries/lib-audio-unit/AudioUnitInstance.cpp @@ -243,7 +243,7 @@ bool AudioUnitInstance::RealtimeAddProcessor( uProcessor->SetBlockSize(mBlockSize); if (!uProcessor->ProcessInitialize(settings, sampleRate, nullptr)) return false; - mSlaves.push_back(move(uProcessor)); + mSlaves.push_back(std::move(uProcessor)); return true; } diff --git a/libraries/lib-audio-unit/AudioUnitWrapper.cpp b/libraries/lib-audio-unit/AudioUnitWrapper.cpp index 30e8318f0..4be860ac0 100644 --- a/libraries/lib-audio-unit/AudioUnitWrapper.cpp +++ b/libraries/lib-audio-unit/AudioUnitWrapper.cpp @@ -420,7 +420,7 @@ AudioUnitWrapper::MakeBlob(const EffectDefinitionInterface &effect, // Caller might not treat this as error, becauase data is non-null message = XO("XML data is empty after conversion"); - return { move(data), message }; + return { std::move(data), message }; } bool AudioUnitWrapper::SetRateAndChannels( diff --git a/libraries/lib-audio-unit/AudioUnitWrapper.h b/libraries/lib-audio-unit/AudioUnitWrapper.h index 186b795dd..86659a0b5 100644 --- a/libraries/lib-audio-unit/AudioUnitWrapper.h +++ b/libraries/lib-audio-unit/AudioUnitWrapper.h @@ -61,7 +61,7 @@ struct AudioUnitEffectSettings { Map values; AudioUnitEffectSettings() = default; - AudioUnitEffectSettings(Map map) : values{ move(map) } {} + AudioUnitEffectSettings(Map map) : values{ std::move(map) } {} //! Get a pointer to a durable copy of `name` //! May allocate memory diff --git a/libraries/lib-builtin-effects/StereoToMono.cpp b/libraries/lib-builtin-effects/StereoToMono.cpp index 26f00c80c..22701fc5b 100644 --- a/libraries/lib-builtin-effects/StereoToMono.cpp +++ b/libraries/lib-builtin-effects/StereoToMono.cpp @@ -117,7 +117,7 @@ bool StereoToMono::ProcessOne( track.SharedPointer(), GetEffectStages(track)); Mixer mixer( - move(tracks), std::nullopt, + std::move(tracks), std::nullopt, true, // Throw to abort mix-and-render if read fails: Mixer::WarpOptions { inputTracks()->GetOwner() }, start, end, 1, idealBlockLen, diff --git a/libraries/lib-lv2/LV2EffectBase.cpp b/libraries/lib-lv2/LV2EffectBase.cpp index 8e1491cfd..227223ec4 100644 --- a/libraries/lib-lv2/LV2EffectBase.cpp +++ b/libraries/lib-lv2/LV2EffectBase.cpp @@ -325,7 +325,7 @@ LV2EffectBase::LoadFactoryPreset(int id, EffectSettings &settings) const auto &mySettings = GetSettings(settings); mPorts.EmitPortValues(*state, mySettings); // Save the state, for whatever might not be contained in port values - mySettings.mpState = move(state); + mySettings.mpState = std::move(state); return { nullptr }; } diff --git a/libraries/lib-lv2/LV2Instance.cpp b/libraries/lib-lv2/LV2Instance.cpp index e560edd85..7a11d0aca 100644 --- a/libraries/lib-lv2/LV2Instance.cpp +++ b/libraries/lib-lv2/LV2Instance.cpp @@ -169,7 +169,7 @@ bool LV2Instance::RealtimeAddProcessor(EffectSettings &settings, if (!pInstance) return false; pInstance->Activate(); - mSlaves.push_back(move(pInstance)); + mSlaves.push_back(std::move(pInstance)); return true; } diff --git a/libraries/lib-lv2/LV2Ports.cpp b/libraries/lib-lv2/LV2Ports.cpp index eed3c449c..bcf7a7e77 100644 --- a/libraries/lib-lv2/LV2Ports.cpp +++ b/libraries/lib-lv2/LV2Ports.cpp @@ -277,7 +277,7 @@ LV2Ports::LV2Ports(const LilvPlugin &plug) const auto &controlPort = mControlPorts.emplace_back( std::make_shared( port, index, isInput, symbol, name, groupName, - move(scaleValues), std::move(scaleLabels), units, + std::move(scaleValues), std::move(scaleLabels), units, min, max, def, hasLo, hasHi, toggle, enumeration, integer, sampleRate, trigger, logarithmic)); diff --git a/libraries/lib-lv2/LV2Ports.h b/libraries/lib-lv2/LV2Ports.h index 7ae267250..b2ffabdc7 100644 --- a/libraries/lib-lv2/LV2Ports.h +++ b/libraries/lib-lv2/LV2Ports.h @@ -79,7 +79,7 @@ using LV2AtomPortArray = std::vector; struct LV2_API LV2AtomPortState final { //! @pre `pPort != nullptr` explicit LV2AtomPortState(LV2AtomPortPtr pPort) - : mpPort{ move(pPort) } + : mpPort{ std::move(pPort) } , mRing{ zix_ring_new(mpPort->mMinimumSize) } , mBuffer{ safenew uint8_t[mpPort->mMinimumSize] } { @@ -147,7 +147,7 @@ using LV2CVPortArray = std::vector; //! State of an instance of an LV2 CV port struct LV2CVPortState final { //! @pre `pPort != nullptr` - explicit LV2CVPortState(LV2CVPortPtr pPort) : mpPort{ move(pPort) } { + explicit LV2CVPortState(LV2CVPortPtr pPort) : mpPort{ std::move(pPort) } { assert(mpPort); } const LV2CVPortPtr mpPort; @@ -169,7 +169,7 @@ public: bool toggle, bool enumeration, bool integer, bool sampleRate, bool trigger, bool logarithmic ) : LV2Port{ port, index, isInput, symbol, name, group } - , mScaleValues{ move(scaleValues) } + , mScaleValues{ std::move(scaleValues) } , mScaleLabels( std::move(scaleLabels) ) , mUnits{ units } , mMin{ min }, mMax{ max }, mDef{ def } @@ -237,7 +237,7 @@ struct LV2_API LV2EffectOutputs : EffectOutputs { struct LV2ControlPortState final { //! @pre `pPort != nullptr` explicit LV2ControlPortState(LV2ControlPortPtr pPort) - : mpPort{ move(pPort) } + : mpPort{ std::move(pPort) } { assert(mpPort); } diff --git a/libraries/lib-menus/CommandManager.cpp b/libraries/lib-menus/CommandManager.cpp index 8f0dda708..6643d719c 100644 --- a/libraries/lib-menus/CommandManager.cpp +++ b/libraries/lib-menus/CommandManager.cpp @@ -88,10 +88,10 @@ CommandManager::Populator::Populator(AudacityProject &project, ) : Visitor{ std::tuple { [this](auto &item, auto &){ DoBeginGroup(item); }, - move(leafVisitor), + std::move(leafVisitor), [this](auto &item, auto &){ DoEndGroup(item); }, }, - move(doSeparator) + std::move(doSeparator) } , mProject{ project } { diff --git a/libraries/lib-menus/MenuRegistry.h b/libraries/lib-menus/MenuRegistry.h index 240c5ea20..4ef9136ab 100644 --- a/libraries/lib-menus/MenuRegistry.h +++ b/libraries/lib-menus/MenuRegistry.h @@ -168,8 +168,8 @@ namespace MenuRegistry { } }} - , mWrapped{ move(functions) } - , mDoSeparator{ move(doSeparator) } + , mWrapped{ std::move(functions) } + , mDoSeparator{ std::move(doSeparator) } {} private: @@ -348,7 +348,7 @@ namespace MenuRegistry { CommandFlag flags_, bool isEffect_, CommandHandlerFinder finder = FinderScope::DefaultFinder()) - : CommandGroupItem(name_, move(items_), + : CommandGroupItem(name_, std::move(items_), CommandFunctorPointer{ static_cast(pmf) }, flags_, isEffect_, finder) @@ -361,7 +361,7 @@ namespace MenuRegistry { CommandFunctorPointer::NonMemberFn fn, CommandFlag flags, bool isEffect = false) - : CommandGroupItem(name, move(items), + : CommandGroupItem(name, std::move(items), CommandFunctorPointer{ fn }, flags, isEffect, nullptr) {} diff --git a/libraries/lib-mixer/EffectStage.cpp b/libraries/lib-mixer/EffectStage.cpp index 26946076a..d32e4b050 100644 --- a/libraries/lib-mixer/EffectStage.cpp +++ b/libraries/lib-mixer/EffectStage.cpp @@ -44,7 +44,7 @@ std::vector> MakeInstances( if (genLength) count = nChannels; - instances.push_back(move(pInstance)); + instances.push_back(std::move(pInstance)); // Advance ii if (count == 0) diff --git a/libraries/lib-mixer/Mix.cpp b/libraries/lib-mixer/Mix.cpp index f75aaab3e..520f95f9a 100644 --- a/libraries/lib-mixer/Mix.cpp +++ b/libraries/lib-mixer/Mix.cpp @@ -58,7 +58,7 @@ void ConsiderStages(const Mixer::Stages& stages, size_t& blockSize) if (pInstance) blockSize = std::min(blockSize, pInstance->SetBlockSize(blockSize)); // Cache the first factory call - stage.mpFirstInstance = move(pInstance); + stage.mpFirstInstance = std::move(pInstance); } } @@ -97,8 +97,8 @@ Mixer::Mixer( sampleFormat outFormat, const bool highQuality, MixerSpec* const mixerSpec, ApplyVolume applyVolume) : mNumChannels { numOutChannels } - , mInputs { move(inputs) } - , mMasterEffects { move(masterEffects) } + , mInputs { std::move(inputs) } + , mMasterEffects { std::move(masterEffects) } , mBufferSize { FindBufferSize(mInputs, mMasterEffects, outBufferSize) } , mApplyVolume { applyVolume } , mHighQuality { highQuality } @@ -425,7 +425,7 @@ std::unique_ptr& Mixer::RegisterEffectStage( auto& stageInput = mStageBuffers.emplace_back(3, mBufferSize, 1); const auto& factory = [&stage] { // Avoid unnecessary repeated calls to the factory - return stage.mpFirstInstance ? move(stage.mpFirstInstance) : + return stage.mpFirstInstance ? std::move(stage.mpFirstInstance) : stage.factory(); }; auto& pNewDownstream = mStages.emplace_back(EffectStage::Create( diff --git a/libraries/lib-mixer/Mix.h b/libraries/lib-mixer/Mix.h index 2cc53d63a..32f834e09 100644 --- a/libraries/lib-mixer/Mix.h +++ b/libraries/lib-mixer/Mix.h @@ -40,7 +40,7 @@ public: Input( std::shared_ptr pSequence = {}, Stages stages = {} - ) : pSequence{ move(pSequence) }, stages{ move(stages) } + ) : pSequence{ std::move(pSequence) }, stages{ std::move(stages) } {} std::shared_ptr pSequence; diff --git a/libraries/lib-mixer/MixerSource.cpp b/libraries/lib-mixer/MixerSource.cpp index 63dc9c0a0..b4470d6c0 100644 --- a/libraries/lib-mixer/MixerSource.cpp +++ b/libraries/lib-mixer/MixerSource.cpp @@ -295,7 +295,7 @@ MixerSource::MixerSource( , mRate{ rate } , mEnvelope{ options.envelope } , mMayThrow{ mayThrow } - , mTimesAndSpeed{ move(pTimesAndSpeed) } + , mTimesAndSpeed{ std::move(pTimesAndSpeed) } , mSampleQueue{ initVector(mnChannels, sQueueMaxLen) } , mQueueStart{ 0 } , mQueueLen{ 0 } diff --git a/libraries/lib-mixer/WideSampleSource.cpp b/libraries/lib-mixer/WideSampleSource.cpp index dee7a4f8b..6ccf922ff 100644 --- a/libraries/lib-mixer/WideSampleSource.cpp +++ b/libraries/lib-mixer/WideSampleSource.cpp @@ -24,7 +24,7 @@ WideSampleSource::WideSampleSource(const WideSampleSequence &sequence, size_t nChannels, sampleCount start, sampleCount len, Poller pollUser -) : mSequence{ sequence }, mnChannels{ nChannels }, mPollUser{ move(pollUser) } +) : mSequence{ sequence }, mnChannels{ nChannels }, mPollUser{ std::move(pollUser) } , mPos{ start }, mOutputRemaining{ len } { assert(nChannels <= sequence.NChannels()); diff --git a/libraries/lib-module-manager/PluginManager.cpp b/libraries/lib-module-manager/PluginManager.cpp index d83378bbc..085ccb910 100644 --- a/libraries/lib-module-manager/PluginManager.cpp +++ b/libraries/lib-module-manager/PluginManager.cpp @@ -382,7 +382,7 @@ PluginManager & PluginManager::Get() void PluginManager::Initialize(ConfigFactory factory) { - sFactory = move(factory); + sFactory = std::move(factory); // Always load the registry first Load(); diff --git a/libraries/lib-nyquist-effects/NyquistBase.cpp b/libraries/lib-nyquist-effects/NyquistBase.cpp index ae5cc8a0d..63355d622 100644 --- a/libraries/lib-nyquist-effects/NyquistBase.cpp +++ b/libraries/lib-nyquist-effects/NyquistBase.cpp @@ -603,7 +603,7 @@ struct NyquistBase::NyxContext using ProgressReport = std::function; NyxContext(ProgressReport progressReport, double scale, double progressTot) - : mProgressReport { move(progressReport) } + : mProgressReport { std::move(progressReport) } , mScale { scale } , mProgressTot { progressTot } { @@ -656,7 +656,7 @@ bool NyquistBase::Process(EffectInstance&, EffectSettings& settings) NyquistBase proxy { NYQUIST_WORKER_ID }; proxy.SetCommand(mInputCmd); proxy.mDebug = nyquistSettings.proxyDebug; - proxy.mControls = move(nyquistSettings.controls); + proxy.mControls = std::move(nyquistSettings.controls); auto result = Delegate(proxy, nyquistSettings.proxySettings); if (result) { @@ -1695,7 +1695,7 @@ bool NyquistBase::ProcessOne( } else { - tempTrack = move(nyxContext.mOutputTrack); + tempTrack = std::move(nyxContext.mOutputTrack); out->Flush(); } diff --git a/libraries/lib-preference-pages/LibraryPrefs.cpp b/libraries/lib-preference-pages/LibraryPrefs.cpp index af5f6adfb..f981b2f48 100644 --- a/libraries/lib-preference-pages/LibraryPrefs.cpp +++ b/libraries/lib-preference-pages/LibraryPrefs.cpp @@ -36,14 +36,14 @@ auto LibraryPrefs::PopulatorItem::Registry() -> Registry::GroupItem & LibraryPrefs::PopulatorItem::PopulatorItem( const Identifier &id, Populator populator) : SingleItem{ id } - , mPopulator{ move(populator) } + , mPopulator{ std::move(populator) } {} LibraryPrefs::RegisteredControls::RegisteredControls( const Identifier &id, Populator populator, const Registry::Placement &placement ) : RegisteredItem{ - std::make_unique< PopulatorItem >( id, move(populator) ), + std::make_unique< PopulatorItem >( id, std::move(populator) ), placement } {} diff --git a/libraries/lib-preferences/Prefs.h b/libraries/lib-preferences/Prefs.h index ade81eef4..65cc5b5e2 100644 --- a/libraries/lib-preferences/Prefs.h +++ b/libraries/lib-preferences/Prefs.h @@ -419,7 +419,7 @@ public: ChoiceSetting(TransactionalSettingBase &key, EnumValueSymbols symbols, long defaultSymbol = -1) : mKey{ key.GetPath() } - , mSymbols{ move(symbols) } + , mSymbols{ std::move(symbols) } , mpOtherSettings{ &key } , mDefaultSymbol{ defaultSymbol } { @@ -430,7 +430,7 @@ public: ChoiceSetting(const SettingBase &key, EnumValueSymbols symbols, long defaultSymbol = -1) : mKey{ key.GetPath() } - , mSymbols{ move(symbols) } + , mSymbols{ std::move(symbols) } , mDefaultSymbol{ defaultSymbol } { assert(defaultSymbol < static_cast(mSymbols.size())); @@ -481,8 +481,8 @@ public: std::vector intValues, // must have same size as symbols const wxString &oldKey = {} - ) : ChoiceSetting{ std::forward(key), move(symbols), defaultSymbol } - , mIntValues{ move(intValues) } + ) : ChoiceSetting{ std::forward(key), std::move(symbols), defaultSymbol } + , mIntValues{ std::move(intValues) } , mOldKey{ oldKey } { assert (mIntValues.size() == mSymbols.size()); @@ -525,7 +525,7 @@ public: const wxString &oldKey = {} ) : EnumSettingBase{ - std::forward(key), move(symbols), defaultSymbol, + std::forward(key), std::move(symbols), defaultSymbol, ConvertValues(values), oldKey } {} diff --git a/libraries/lib-realtime-effects/RealtimeEffectManager.h b/libraries/lib-realtime-effects/RealtimeEffectManager.h index 39a2e9e1b..7226dccde 100644 --- a/libraries/lib-realtime-effects/RealtimeEffectManager.h +++ b/libraries/lib-realtime-effects/RealtimeEffectManager.h @@ -216,7 +216,7 @@ public: std::weak_ptr wProject, double sampleRate, unsigned numPlaybackChannels ) : mSampleRate{ sampleRate } - , mwProject{ move(wProject) } + , mwProject{ std::move(wProject) } , mNumPlaybackChannels{ numPlaybackChannels } { if (const auto pProject = mwProject.lock()) @@ -258,7 +258,7 @@ public: //! Require a prior InializationScope to ensure correct nesting explicit ProcessingScope(InitializationScope &, std::weak_ptr wProject) - : mwProject{ move(wProject) } + : mwProject{ std::move(wProject) } { if (auto pProject = mwProject.lock()) RealtimeEffectManager::Get(*pProject).ProcessStart(mSuspended); diff --git a/libraries/lib-registries/Registry.h b/libraries/lib-registries/Registry.h index 9875cd176..7e18e70c8 100644 --- a/libraries/lib-registries/Registry.h +++ b/libraries/lib-registries/Registry.h @@ -184,7 +184,7 @@ namespace detail { explicit ComputedItemBase(const TypeErasedFactory &factory) : BaseItem(wxEmptyString) - , factory{ move(factory) } + , factory{ std::move(factory) } {} ~ComputedItemBase() override; @@ -340,7 +340,7 @@ namespace detail { template auto operator () (std::unique_ptr ptr) const { static_assert(AcceptableType_v); - return move(ptr); + return std::move(ptr); } //! This overload allows a lambda or function pointer in the variadic //! argument lists without any other syntactic wrapping. @@ -375,7 +375,7 @@ namespace detail { static_assert(AcceptableType_v, "Registered item must be of one of the types listed in the registry's " "traits"); - detail::RegisterItem(registry, placement, move(pItem)); + detail::RegisterItem(registry, placement, std::move(pItem)); } //! Generates classes whose instances register items at construction @@ -391,7 +391,7 @@ namespace detail { RegisteredItem(Ptr pItem, const Placement &placement = {}) { if (pItem) - RegisterItem(RegistryClass::Registry(), placement, move(pItem)); + RegisterItem(RegistryClass::Registry(), placement, std::move(pItem)); } }; @@ -489,7 +489,7 @@ namespace detail { template VisitorFunctions(Visitors &&visitors) { using namespace detail; using namespace std; - decltype(auto) forwarded = forward(visitors); + decltype(auto) forwarded = std::forward(visitors); static constexpr auto size = TupleSize>; static_assert(size == 1 || size == 3); if constexpr (size == 1) diff --git a/libraries/lib-snapping/Snap.cpp b/libraries/lib-snapping/Snap.cpp index 9f5221ebd..fadad580b 100644 --- a/libraries/lib-snapping/Snap.cpp +++ b/libraries/lib-snapping/Snap.cpp @@ -35,7 +35,7 @@ SnapManager::SnapManager(const AudacityProject &project, , mZoomInfo{ &zoomInfo } , mPixelTolerance{ pixelTolerance } , mNoTimeSnap{ noTimeSnap } -, mCandidates{ move( candidates ) } +, mCandidates{ std::move( candidates ) } , mSnapPoints{} { Reinit(); @@ -51,7 +51,7 @@ SnapPointArray FindCandidates( if (interval->Start() != interval->End()) candidates.emplace_back(interval->End(), track); } - return move(candidates); + return std::move(candidates); } } @@ -64,7 +64,7 @@ SnapManager::SnapManager(const AudacityProject &project, : SnapManager{ project, // Add candidates to given ones by default rules, // then delegate to other ctor - FindCandidates( move(candidates), tracks ), + FindCandidates( std::move(candidates), tracks ), zoomInfo, noTimeSnap, pixelTolerance } { } diff --git a/libraries/lib-track-selection/TrackFocus.cpp b/libraries/lib-track-selection/TrackFocus.cpp index 5111e8aae..81f839336 100644 --- a/libraries/lib-track-selection/TrackFocus.cpp +++ b/libraries/lib-track-selection/TrackFocus.cpp @@ -150,7 +150,7 @@ TrackFocus::~TrackFocus() void TrackFocus::SetCallbacks(std::unique_ptr pCallbacks) { - mpCallbacks = move(pCallbacks); + mpCallbacks = std::move(pCallbacks); } Track *TrackFocus::Get() diff --git a/libraries/lib-track/ChannelAttachments.cpp b/libraries/lib-track/ChannelAttachments.cpp index 5821727dc..f02126739 100644 --- a/libraries/lib-track/ChannelAttachments.cpp +++ b/libraries/lib-track/ChannelAttachments.cpp @@ -17,7 +17,7 @@ ChannelAttachmentsBase & ChannelAttachmentsBase::operator=(ChannelAttachmentsBase &&other) { assert(typeid(*this) == typeid(other)); - mAttachments = move(other.mAttachments); + mAttachments = std::move(other.mAttachments); return *this; } @@ -74,7 +74,7 @@ ChannelAttachment *ChannelAttachmentsBase::Find( } ChannelAttachmentsBase::ChannelAttachmentsBase(Track &track, Factory factory) - : mFactory{ move(factory) } + : mFactory{ std::move(factory) } { const auto nChannels = track.NChannels(); for (size_t iChannel = 0; iChannel < nChannels; ++iChannel) @@ -135,7 +135,7 @@ void ChannelAttachmentsBase::MakeStereo(const std::shared_ptr &parent, mAttachments.resize(1); auto index = mAttachments.size(); for (auto &ptr : other.mAttachments) { - if (auto &pAttachment = mAttachments.emplace_back(move(ptr))) + if (auto &pAttachment = mAttachments.emplace_back(std::move(ptr))) pAttachment->Reparent(parent, index++); } other.mAttachments.clear(); diff --git a/libraries/lib-track/PendingTracks.cpp b/libraries/lib-track/PendingTracks.cpp index 10ad5ac6f..ee070f463 100644 --- a/libraries/lib-track/PendingTracks.cpp +++ b/libraries/lib-track/PendingTracks.cpp @@ -170,7 +170,7 @@ Track* PendingTracks::RegisterPendingChangedTrack(Updater updater, Track *src) auto track = src->Duplicate(Track::DuplicateOptions{}.ShallowCopyAttachments()); - mUpdaters.push_back(move(updater)); + mUpdaters.push_back(std::move(updater)); mPendingUpdates->Add(track); return track.get(); } @@ -267,7 +267,7 @@ bool PendingTracks::ApplyPendingTracks() // If there are tracks to reinstate, append them to the list. for (auto &pendingTrack : reinstated) if (pendingTrack) - mTracks.Add(move(pendingTrack)), result = true; + mTracks.Add(std::move(pendingTrack)), result = true; // Put the pending added tracks back into the list, preserving their // positions and assigning ids. diff --git a/libraries/lib-utility/Composite.h b/libraries/lib-utility/Composite.h index b29715a33..bd988c530 100644 --- a/libraries/lib-utility/Composite.h +++ b/libraries/lib-utility/Composite.h @@ -59,7 +59,7 @@ public: auto crbegin() const { return items.crbegin(); } auto crend() const { return items.crend(); } - void push_back(value_type ptr){ items.push_back(move(ptr)); } + void push_back(value_type ptr){ items.push_back(std::move(ptr)); } auto size() const noexcept { return items.size(); } [[nodiscard]] bool empty() const { return items.empty(); } diff --git a/libraries/lib-utility/Observer.cpp b/libraries/lib-utility/Observer.cpp index 390527a00..0902ecb4d 100644 --- a/libraries/lib-utility/Observer.cpp +++ b/libraries/lib-utility/Observer.cpp @@ -20,7 +20,7 @@ void RecordBase::Unlink() noexcept assert(pPrev); // See RecordList constructor and PushFront // Do not move from next, see Visit if (auto &pNext = (pPrev->next = next)) - pNext->prev = move(prev); + pNext->prev = std::move(prev); } RecordList::RecordList( ExceptionPolicy *pPolicy, Visitor visitor ) @@ -33,19 +33,19 @@ RecordList::RecordList( ExceptionPolicy *pPolicy, Visitor visitor ) RecordList::~RecordList() noexcept { //! Non-defaulted destructor. Beware stack growth - auto pRecord = move(next); + auto pRecord = std::move(next); while (pRecord) - pRecord = move(pRecord->next); + pRecord = std::move(pRecord->next); } Subscription RecordList::Subscribe(std::shared_ptr pRecord) { assert(pRecord); // precondition auto result = Subscription{ pRecord }; - if (auto &pNext = (pRecord->next = move(next))) + if (auto &pNext = (pRecord->next = std::move(next))) pNext->prev = pRecord; pRecord->prev = weak_from_this(); - next = move(pRecord); + next = std::move(pRecord); return result; } @@ -84,7 +84,7 @@ ExceptionPolicy::~ExceptionPolicy() noexcept = default; Subscription::Subscription() = default; Subscription::Subscription(std::weak_ptr pRecord) - : m_wRecord{ move(pRecord) } {} + : m_wRecord{ std::move(pRecord) } {} Subscription::Subscription(Subscription &&) = default; Subscription &Subscription::operator=(Subscription &&other) { @@ -93,7 +93,7 @@ Subscription &Subscription::operator=(Subscription &&other) other.m_wRecord.owner_before(m_wRecord); if (inequivalent) { Reset(); - m_wRecord = move(other.m_wRecord); + m_wRecord = std::move(other.m_wRecord); } return *this; } diff --git a/libraries/lib-utility/Observer.h b/libraries/lib-utility/Observer.h index de7abf7e8..39399ffca 100644 --- a/libraries/lib-utility/Observer.h +++ b/libraries/lib-utility/Observer.h @@ -150,7 +150,7 @@ public: } struct Record : detail::RecordBase { - explicit Record(Callback callback) : callback{ move(callback) } {} + explicit Record(Callback callback) : callback{ std::move(callback) } {} Callback callback; }; @@ -188,8 +188,8 @@ Publisher::Publisher(ExceptionPolicy *pPolicy, Alloc a) return record.callback(message); } ) } -, m_factory( [a = move(a)](Callback callback) { - return std::allocate_shared(a, move(callback)); +, m_factory( [a = std::move(a)](Callback callback) { + return std::allocate_shared(a, std::move(callback)); } ) {} @@ -200,7 +200,7 @@ auto Publisher::Subscribe(Callback callback) -> Subscription { assert(callback); // precondition - return m_list->Subscribe(m_factory(move(callback))); + return m_list->Subscribe(m_factory(std::move(callback))); } template inline diff --git a/libraries/lib-viewport/Viewport.cpp b/libraries/lib-viewport/Viewport.cpp index 0c0dfe1d1..2dd11543b 100644 --- a/libraries/lib-viewport/Viewport.cpp +++ b/libraries/lib-viewport/Viewport.cpp @@ -63,7 +63,7 @@ Viewport::Viewport(AudacityProject &project) void Viewport::SetCallbacks(std::unique_ptr pCallbacks) { - mpCallbacks = move(pCallbacks); + mpCallbacks = std::move(pCallbacks); } void Viewport::FinishAutoScroll() diff --git a/libraries/lib-vst/VSTInstance.cpp b/libraries/lib-vst/VSTInstance.cpp index d8de81f40..b18370833 100644 --- a/libraries/lib-vst/VSTInstance.cpp +++ b/libraries/lib-vst/VSTInstance.cpp @@ -176,7 +176,7 @@ bool VSTInstance::RealtimeAddProcessor(EffectSettings &settings, if (!slave->ProcessInitialize(settings, sampleRate, ChannelNames())) return false; - mSlaves.emplace_back(move(slave)); + mSlaves.emplace_back(std::move(slave)); return true; } diff --git a/libraries/lib-wave-track-settings/WaveformSettings.cpp b/libraries/lib-wave-track-settings/WaveformSettings.cpp index 9969831fd..36709a698 100644 --- a/libraries/lib-wave-track-settings/WaveformSettings.cpp +++ b/libraries/lib-wave-track-settings/WaveformSettings.cpp @@ -83,7 +83,7 @@ WaveformSettings &WaveformSettings::Get(const WaveChannel &channel) void WaveformSettings::Set( WaveChannel &channel, std::unique_ptr pSettings) { - channel.GetTrack().Attachments::Assign(key1, move(pSettings)); + channel.GetTrack().Attachments::Assign(key1, std::move(pSettings)); } WaveformSettings::WaveformSettings() diff --git a/libraries/lib-wave-track/TimeStretching.cpp b/libraries/lib-wave-track/TimeStretching.cpp index 5ddaf2ca5..d19f743b0 100644 --- a/libraries/lib-wave-track/TimeStretching.cpp +++ b/libraries/lib-wave-track/TimeStretching.cpp @@ -33,7 +33,7 @@ void TimeStretching::WithClipRenderingProgress( std::function action, const TranslatableString title) { - return UserException::WithCancellableProgress(move(action), + return UserException::WithCancellableProgress(std::move(action), std::move(title), XO("Rendering Clip")); } diff --git a/libraries/lib-wave-track/WaveClip.cpp b/libraries/lib-wave-track/WaveClip.cpp index 50f5dd7fc..46d3f392d 100644 --- a/libraries/lib-wave-track/WaveClip.cpp +++ b/libraries/lib-wave-track/WaveClip.cpp @@ -411,7 +411,7 @@ void WaveClip::SetSamples(size_t ii, void WaveClip::SetEnvelope(std::unique_ptr p) { assert(p); - mEnvelope = move(p); + mEnvelope = std::move(p); } const BlockArray* WaveClip::GetSequenceBlockArray(size_t ii) const @@ -454,7 +454,7 @@ void WaveClip::TransferSequence(WaveClip &origClip, WaveClip &newClip) { // Move right channel into result newClip.mSequences.resize(1); - newClip.mSequences[0] = move(origClip.mSequences[1]); + newClip.mSequences[0] = std::move(origClip.mSequences[1]); // Delayed satisfaction of the class invariants after the empty construction newClip.CheckInvariants(); } @@ -519,7 +519,7 @@ void WaveClip::MakeStereo(WaveClip &&other, bool mustAlign) mCutLines.clear(); mSequences.resize(2); - mSequences[1] = move(other.mSequences[0]); + mSequences[1] = std::move(other.mSequences[0]); this->Attachments::ForCorresponding(other, [mustAlign](WaveClipListener *pLeft, WaveClipListener *pRight){ @@ -1464,13 +1464,13 @@ void WaveClip::ClearAndAddCutLine(double t0, double t1) transaction.Commit(); MarkChanged(); - AddCutLine(move(newClip)); + AddCutLine(std::move(newClip)); } void WaveClip::AddCutLine(WaveClipHolder pClip) { assert(NChannels() == pClip->NChannels()); - mCutLines.push_back(move(pClip)); + mCutLines.push_back(std::move(pClip)); // New clip is assumed to have correct width assert(CheckInvariants()); } @@ -1710,7 +1710,7 @@ void WaveClip::Resample(int rate, BasicUI::ProgressDialog *progress) else { // Use No-fail-guarantee in these steps - mSequences = move(newSequences); + mSequences = std::move(newSequences); mRate = rate; Flush(); Attachments::ForEach( std::mem_fn( &WaveClipListener::Invalidate ) ); diff --git a/libraries/lib-wave-track/WaveTrack.cpp b/libraries/lib-wave-track/WaveTrack.cpp index 05c8945f9..f32b9700d 100644 --- a/libraries/lib-wave-track/WaveTrack.cpp +++ b/libraries/lib-wave-track/WaveTrack.cpp @@ -160,7 +160,7 @@ WaveTrack::IntervalHolder GetRenderedCopy( originalPlayEndTime, interval.GetSequenceEndTime() + samplePeriod, samplePeriod); dstEnvelope->CollapseRegion(0, originalPlayStartTime, samplePeriod); dstEnvelope->SetOffset(originalPlayStartTime); - dst->SetEnvelope(move(dstEnvelope)); + dst->SetEnvelope(std::move(dstEnvelope)); success = true; @@ -1153,7 +1153,7 @@ void WaveTrack::FinishCopy( placeholder->SetIsPlaceholder(true); placeholder->InsertSilence(0, (t1 - t0) - GetEndTime()); placeholder->ShiftBy(GetEndTime()); - InsertInterval(move(placeholder), true, false); + InsertInterval(std::move(placeholder), true, false); } } @@ -1334,7 +1334,7 @@ void WaveTrack::ClearAndPasteAtSameTempo( cut->SetSequenceStartTime(cs); bool removed = clip->RemoveCutLine(unrounded); assert(removed); - cuts.push_back(move(cut)); + cuts.push_back(std::move(cut)); } } } @@ -1459,7 +1459,7 @@ void WaveTrack::ClearAndPasteAtSameTempo( if (split.right) // new clip was cleared left attachLeft(*newClip, *split.right); - track.InsertInterval(move(newClip), false); + track.InsertInterval(std::move(newClip), false); break; } else if (clip->GetPlayStartSample() == @@ -1583,7 +1583,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, clipsToDelete.push_back(clip); auto newClip = CopyClip(*clip, true); newClip->ClearAndAddCutLine(t0, t1); - clipsToAdd.push_back(move(newClip)); + clipsToAdd.push_back(std::move(newClip)); } else { if (split || clearByTrimming) { @@ -1601,7 +1601,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, // If this is not a split-cut, where things are left in // place, we need to reposition the clip. newClip->ShiftBy(t0 - t1); - clipsToAdd.push_back(move(newClip)); + clipsToAdd.push_back(std::move(newClip)); } else if (clip->AfterPlayRegion(t1)) { // Delete to right edge @@ -1612,7 +1612,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, auto newClip = CopyClip(*clip, true); newClip->TrimRight(clip->GetPlayEndTime() - t0); - clipsToAdd.push_back(move(newClip)); + clipsToAdd.push_back(std::move(newClip)); } else { // Delete in the middle of the clip...we actually create two @@ -1620,7 +1620,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, auto leftClip = CopyClip(*clip, true); leftClip->TrimRight(clip->GetPlayEndTime() - t0); - clipsToAdd.push_back(move(leftClip)); + clipsToAdd.push_back(std::move(leftClip)); auto rightClip = CopyClip(*clip, true); rightClip->TrimLeft(t1 - clip->GetPlayStartTime()); @@ -1628,7 +1628,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, // If this is not a split-cut, where things are left in // place, we need to reposition the clip. rightClip->ShiftBy(t0 - t1); - clipsToAdd.push_back(move(rightClip)); + clipsToAdd.push_back(std::move(rightClip)); clipsToDelete.push_back(clip); } @@ -1644,7 +1644,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, // clip->Clear keeps points < t0 and >= t1 via Envelope::CollapseRegion newClip->Clear(t0,t1); - clipsToAdd.push_back(move(newClip)); + clipsToAdd.push_back(std::move(newClip)); } } } @@ -1665,7 +1665,7 @@ void WaveTrack::HandleClear(double t0, double t1, bool addCutLines, clip->ShiftBy(-(t1 - t0)); for (auto &clip: clipsToAdd) - InsertInterval(move(clip), false); + InsertInterval(std::move(clip), false); } void WaveTrack::SyncLockAdjust(double oldT1, double newT1) @@ -1893,7 +1893,7 @@ void WaveTrack::PasteWaveTrackAtSameTempo( (oldPlayStart + t0) - clip->GetTrimLeft(); const auto newClip = CreateClip(newSequenceStart, name, clip.get()); newClip->Resample(rate); - track.InsertInterval(move(newClip), false); + track.InsertInterval(std::move(newClip), false); } } } @@ -2051,7 +2051,7 @@ void WaveTrack::InsertSilence(double t, double len) auto clip = CreateClip(0); clip->InsertSilence(0, len); // use No-fail-guarantee - InsertInterval(move(clip), true); + InsertInterval(std::move(clip), true); } else { @@ -2233,7 +2233,7 @@ void WaveTrack::Join( RemoveClip(FindClip(*clip)); } - InsertInterval(move(newClip), false); + InsertInterval(std::move(newClip), false); } /*! @excsafety{Partial} @@ -3202,7 +3202,7 @@ auto WaveTrack::SplitAt(double t) -> std::pair // This could invalidate the iterators for the loop! But we return // at once so it's okay - InsertInterval(move(newClip), false); // transfer ownership + InsertInterval(std::move(newClip), false); // transfer ownership return result; } } @@ -3382,7 +3382,7 @@ void WaveTrack::ZipClips(bool mustAlign) while (iterRight != endRight) { // Leftover misaligned mono clips - mClips.emplace_back(move(*iterRight)); + mClips.emplace_back(std::move(*iterRight)); ++iterRight; } diff --git a/libraries/lib-wave-track/WaveTrackUtilities.cpp b/libraries/lib-wave-track/WaveTrackUtilities.cpp index 170697f3a..30bdde532 100644 --- a/libraries/lib-wave-track/WaveTrackUtilities.cpp +++ b/libraries/lib-wave-track/WaveTrackUtilities.cpp @@ -57,8 +57,8 @@ void WaveTrackUtilities::AllClipsIterator::Push(IntervalHolders clips) // Go depth first while there are cutlines while (!clips.empty()) { auto nextClips = clips[0]->GetCutLines(); - mStack.push_back({ move(clips), 0 }); - clips = move(nextClips); + mStack.push_back({ std::move(clips), 0 }); + clips = std::move(nextClips); } } @@ -397,7 +397,7 @@ void WaveTrackUtilities::VisitBlocks(TrackList &tracks, BlockVisitor visitor, void WaveTrackUtilities::InspectBlocks(const TrackList &tracks, BlockInspector inspector, SampleBlockIDSet *pIDs) { - VisitBlocks(const_cast(tracks), move(inspector), pIDs); + VisitBlocks(const_cast(tracks), std::move(inspector), pIDs); } void WaveTrackUtilities::ExpandClipTillNextOne( diff --git a/libraries/lib-xml/XMLMethodRegistry.cpp b/libraries/lib-xml/XMLMethodRegistry.cpp index d19afeb3c..648791610 100644 --- a/libraries/lib-xml/XMLMethodRegistry.cpp +++ b/libraries/lib-xml/XMLMethodRegistry.cpp @@ -22,8 +22,8 @@ void XMLMethodRegistryBase::Register( // can be keyed by string_view. // Beware small-string optimization! Be sure strings don't relocate for // growth of the container. Use a list, not a vector. - auto &newtag = mTags.emplace_front(move(tag)); - mTagTable[ newtag ] = move( accessor ); + auto &newtag = mTags.emplace_front(std::move(tag)); + mTagTable[ newtag ] = std::move( accessor ); } XMLTagHandler *XMLMethodRegistryBase::CallObjectAccessor( @@ -38,15 +38,15 @@ XMLTagHandler *XMLMethodRegistryBase::CallObjectAccessor( void XMLMethodRegistryBase::PushAccessor( TypeErasedAccessor accessor ) { - mAccessors.emplace_back( move( accessor ) ); + mAccessors.emplace_back( std::move( accessor ) ); } void XMLMethodRegistryBase::Register( std::string tag, TypeErasedMutator mutator ) { // Similar to the other overload of Register - auto &newtag = mMutatorTags.emplace_front(move(tag)); - mMutatorTable[ newtag ] = { mAccessors.size() - 1, move( mutator ) }; + auto &newtag = mMutatorTags.emplace_front(std::move(tag)); + mMutatorTable[ newtag ] = { mAccessors.size() - 1, std::move( mutator ) }; } bool XMLMethodRegistryBase::CallAttributeHandler( const std::string_view &tag, @@ -66,7 +66,7 @@ bool XMLMethodRegistryBase::CallAttributeHandler( const std::string_view &tag, void XMLMethodRegistryBase::RegisterAttributeWriter( TypeErasedWriter writer ) { - mAttributeWriterTable.emplace_back( move( writer ) ); + mAttributeWriterTable.emplace_back( std::move( writer ) ); } void XMLMethodRegistryBase::CallAttributeWriters( @@ -80,7 +80,7 @@ void XMLMethodRegistryBase::CallAttributeWriters( void XMLMethodRegistryBase::RegisterObjectWriter( TypeErasedWriter writer ) { - mObjectWriterTable.emplace_back( move( writer ) ); + mObjectWriterTable.emplace_back( std::move( writer ) ); } void XMLMethodRegistryBase::CallObjectWriters( diff --git a/libraries/lib-xml/XMLMethodRegistry.h b/libraries/lib-xml/XMLMethodRegistry.h index 1f7ebfecd..efad5a907 100644 --- a/libraries/lib-xml/XMLMethodRegistry.h +++ b/libraries/lib-xml/XMLMethodRegistry.h @@ -141,7 +141,7 @@ struct AttributeReaderEntries { ); for (auto &pair : pairs) registry.Register( pair.first, - [ fn = move(pair.second) ]( auto p, auto value ){ + [ fn = std::move(pair.second) ]( auto p, auto value ){ fn( *static_cast(p), value ); } ); } diff --git a/src/AdornedRulerPanel.cpp b/src/AdornedRulerPanel.cpp index 780d338d0..426dbdd17 100644 --- a/src/AdornedRulerPanel.cpp +++ b/src/AdornedRulerPanel.cpp @@ -2301,7 +2301,7 @@ void AdornedRulerPanel::HandleSnapping(size_t index) SnapPoint{ selectedRegion.t0() }, SnapPoint{ selectedRegion.t1() }, }; - SnapManager snapManager{ *mProject, *mTracks, *mViewInfo, move(candidates) }; + SnapManager snapManager{ *mProject, *mTracks, *mViewInfo, std::move(candidates) }; auto results = snapManager.Snap(nullptr, mQuickPlayPos[index], false); mQuickPlayPos[index] = results.outTime; mIsSnapped[index] = results.Snapped(); diff --git a/src/RealtimeEffectPanel.cpp b/src/RealtimeEffectPanel.cpp index bde7ca7c7..16244495b 100644 --- a/src/RealtimeEffectPanel.cpp +++ b/src/RealtimeEffectPanel.cpp @@ -213,7 +213,7 @@ namespace if(!submenu->empty()) { - root->push_back(move(analyzeSection)); + root->push_back(std::move(analyzeSection)); } MenuHelper::PopulateEffectsMenu( diff --git a/src/SpectralDataManager.cpp b/src/SpectralDataManager.cpp index 4d6381182..695caea90 100644 --- a/src/SpectralDataManager.cpp +++ b/src/SpectralDataManager.cpp @@ -210,7 +210,7 @@ std::vector SpectralDataManager::Worker::ProcessOvertones( // The calculated multiple frequency peaks will be stored in mOvertonesTargetFreqBin TrackSpectrumTransformer::Process( OvertonesProcessor, channel, 1, startSC, winSize); - return move( mOvertonesTargetFreqBin ); + return std::move( mOvertonesTargetFreqBin ); } bool SpectralDataManager::Worker::SnappingProcessor(SpectrumTransformer &transformer) { diff --git a/src/TrackPanelAx.cpp b/src/TrackPanelAx.cpp index 10a8c5dc8..a344090d3 100644 --- a/src/TrackPanelAx.cpp +++ b/src/TrackPanelAx.cpp @@ -70,9 +70,9 @@ TrackPanelAx::TrackPanelAx(std::weak_ptr wViewport, // window pointer must be set after construction WindowAccessible(nullptr), #endif - mwViewport{ move(wViewport) }, - mwFocus{ move(wFocus) } - , mFinder{ move(finder) } + mwViewport{ std::move(wViewport) }, + mwFocus{ std::move(wFocus) } + , mFinder{ std::move(finder) } { } diff --git a/src/effects/lv2/LV2Editor.cpp b/src/effects/lv2/LV2Editor.cpp index be390f282..db87b4132 100644 --- a/src/effects/lv2/LV2Editor.cpp +++ b/src/effects/lv2/LV2Editor.cpp @@ -205,7 +205,7 @@ bool LV2Editor::BuildFancy( { assert(pWrapper); auto &wrapper = *pWrapper; - mpWrapper = move(pWrapper); + mpWrapper = std::move(pWrapper); using namespace LV2Symbols; // Set the native UI type const char *nativeType = diff --git a/src/effects/lv2/LV2Effect.cpp b/src/effects/lv2/LV2Effect.cpp index b180e413f..c57778235 100644 --- a/src/effects/lv2/LV2Effect.cpp +++ b/src/effects/lv2/LV2Effect.cpp @@ -105,7 +105,7 @@ std::unique_ptr LV2Effect::PopulateUI(const EffectPlugin &, #endif if (result->mUseGUI) - result->mUseGUI = result->BuildFancy(move(pWrapper), settings); + result->mUseGUI = result->BuildFancy(std::move(pWrapper), settings); if (!result->mUseGUI && !result->BuildPlain(access)) return nullptr; result->UpdateUI(); diff --git a/src/effects/nyquist/Nyquist.cpp b/src/effects/nyquist/Nyquist.cpp index e8ef88fb1..6cb100e22 100644 --- a/src/effects/nyquist/Nyquist.cpp +++ b/src/effects/nyquist/Nyquist.cpp @@ -149,7 +149,7 @@ int NyquistEffect::ShowHostInterface(EffectBase &plugin, auto &nyquistSettings = GetSettings(settings); nyquistSettings.proxySettings = std::move(newSettings); nyquistSettings.proxyDebug = this->mDebug; - nyquistSettings.controls = move(effect.mControls); + nyquistSettings.controls = std::move(effect.mControls); return nullptr; }); } diff --git a/src/import/ImportRaw.cpp b/src/import/ImportRaw.cpp index 0f937728a..48fce2a7a 100644 --- a/src/import/ImportRaw.cpp +++ b/src/import/ImportRaw.cpp @@ -252,7 +252,7 @@ void ImportRaw(const AudacityProject &project, wxWindow *parent, const wxString if (updateResult == ProgressResult::Failed || updateResult == ProgressResult::Cancelled) throw UserException{}; - ImportUtils::FinalizeImport(outTracks, move(*trackList)); + ImportUtils::FinalizeImport(outTracks, std::move(*trackList)); } diff --git a/src/menus/ClipMenus.cpp b/src/menus/ClipMenus.cpp index 2a8263597..10db3be5e 100644 --- a/src/menus/ClipMenus.cpp +++ b/src/menus/ClipMenus.cpp @@ -600,7 +600,7 @@ double DoClipMove(AudacityProject &project, TrackList &trackList, auto desiredT0 = viewInfo.OffsetTimeByPixels(t0, (right ? 1 : -1)); auto desiredSlideAmount = pShifter->HintOffsetLarger(desiredT0 - t0); - state.Init(project, pShifter->GetTrack(), hitTestResult, move(uShifter), + state.Init(project, pShifter->GetTrack(), hitTestResult, std::move(uShifter), t0, viewInfo, trackList, syncLocked); auto hSlideAmount = state.DoSlideHorizontal(desiredSlideAmount); diff --git a/src/menus/MenuHelper.cpp b/src/menus/MenuHelper.cpp index 22400c237..bf609e125 100644 --- a/src/menus/MenuHelper.cpp +++ b/src/menus/MenuHelper.cpp @@ -177,7 +177,7 @@ void AddEffectMenuItemGroup( i++; } - table.push_back(move(subMenu)); + table.push_back(std::move(subMenu)); i--; } else @@ -297,14 +297,14 @@ auto MakeAddGroupItems( AddEffectMenuItemGroup(*temp, groupNames, groupPlugs, groupFlags, onMenuCommand); - items.push_back(move(temp)); + items.push_back(std::move(temp)); } else { auto temp = Menu("", p.first); AddEffectMenuItemGroup(*temp, groupNames, groupPlugs, groupFlags, onMenuCommand); - items.push_back(move(temp)); + items.push_back(std::move(temp)); } } } @@ -341,12 +341,12 @@ void AddGroupedEffectMenuItems( if (label.empty()) { auto items = Items(""); AddEffectMenuItemGroup(*items, names, group, flags, onMenuCommand); - parentTable->push_back(move(items)); + parentTable->push_back(std::move(items)); } else { auto items = Menu("", label); AddEffectMenuItemGroup(*items, names, group, flags, onMenuCommand); - parentTable->push_back(move(items)); + parentTable->push_back(std::move(items)); } names.clear(); @@ -384,7 +384,7 @@ void AddGroupedEffectMenuItems( path = { effectFamilyName, vendorName }; auto menu = Menu("", effectFamilyName); parentTable = menu.get(); - table.push_back(move(menu)); + table.push_back(std::move(menu)); } else if(path[1] != vendorName) { @@ -759,14 +759,14 @@ void MenuHelper::PopulateEffectsMenu( section.add(*group, section.plugins); if (group->empty()) continue; - menuItems.push_back(move(group)); + menuItems.push_back(std::move(group)); } else { auto group = MenuRegistry::Section(""); section.add(*group, section.plugins); if (group->empty()) continue; - menuItems.push_back(move(group)); + menuItems.push_back(std::move(group)); } } } diff --git a/src/prefs/ImportExportPrefs.cpp b/src/prefs/ImportExportPrefs.cpp index 0b65dc148..435b9eb8a 100644 --- a/src/prefs/ImportExportPrefs.cpp +++ b/src/prefs/ImportExportPrefs.cpp @@ -42,14 +42,14 @@ auto ImportExportPrefs::PopulatorItem::Registry() ImportExportPrefs::PopulatorItem::PopulatorItem( const Identifier &id, Populator populator) : SingleItem{ id } - , mPopulator{ move(populator) } + , mPopulator{ std::move(populator) } {} ImportExportPrefs::RegisteredControls::RegisteredControls( const Identifier &id, Populator populator, const Registry::Placement &placement ) : RegisteredItem{ - std::make_unique(id, move(populator)), + std::make_unique(id, std::move(populator)), placement } {} diff --git a/src/tracks/playabletrack/wavetrack/ui/CutlineHandle.cpp b/src/tracks/playabletrack/wavetrack/ui/CutlineHandle.cpp index 6a50ffe29..15203e6ab 100644 --- a/src/tracks/playabletrack/wavetrack/ui/CutlineHandle.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/CutlineHandle.cpp @@ -31,7 +31,7 @@ CutlineHandle::CutlineHandle( WaveTrackLocations locations, WaveTrackLocation location ) : mpTrack{ pTrack } - , mLocations{ move(locations) } + , mLocations{ std::move(locations) } , mLocation{ location } { } @@ -96,7 +96,7 @@ UIHandlePtr CutlineHandle::HitTest( return {}; auto result = - std::make_shared(pTrack, move(locations), location); + std::make_shared(pTrack, std::move(locations), location); result = AssignUIHandlePtr(holder, result); return result; } diff --git a/src/tracks/playabletrack/wavetrack/ui/SpectrumCache.cpp b/src/tracks/playabletrack/wavetrack/ui/SpectrumCache.cpp index 818dfd62b..311269bfd 100644 --- a/src/tracks/playabletrack/wavetrack/ui/SpectrumCache.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/SpectrumCache.cpp @@ -617,8 +617,8 @@ void WaveClipSpectrumCache::MakeStereo(WaveClipListener &&other, bool) { auto pOther = dynamic_cast(&other); assert(pOther); // precondition - mSpecCaches.push_back(move(pOther->mSpecCaches[0])); - mSpecPxCaches.push_back(move(pOther->mSpecPxCaches[0])); + mSpecCaches.push_back(std::move(pOther->mSpecCaches[0])); + mSpecPxCaches.push_back(std::move(pOther->mSpecPxCaches[0])); } void WaveClipSpectrumCache::SwapChannels() diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveClipAdjustBorderHandle.cpp b/src/tracks/playabletrack/wavetrack/ui/WaveClipAdjustBorderHandle.cpp index 64dcbbe61..6b0afbeed 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveClipAdjustBorderHandle.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/WaveClipAdjustBorderHandle.cpp @@ -349,7 +349,7 @@ WaveClipAdjustBorderHandle::WaveClipAdjustBorderHandle( bool stretchMode, bool leftBorder) : mAdjustPolicy{ std::move(adjustPolicy) } - , mpTrack{ move(pTrack) } + , mpTrack{ std::move(pTrack) } , mIsStretchMode{stretchMode} , mIsLeftBorder{leftBorder} { diff --git a/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp b/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp index c5fd53bc2..6bf3ab9fa 100644 --- a/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp +++ b/src/tracks/playabletrack/wavetrack/ui/WaveTrackAffordanceControls.cpp @@ -95,7 +95,7 @@ public: WaveClipTitleEditHandle(const std::shared_ptr& helper, const std::shared_ptr pTrack) : mHelper(helper) - , mpTrack{ move(pTrack) } + , mpTrack{ std::move(pTrack) } { } ~WaveClipTitleEditHandle() diff --git a/src/tracks/ui/BrushHandle.cpp b/src/tracks/ui/BrushHandle.cpp index 7c47f481d..5d1648215 100644 --- a/src/tracks/ui/BrushHandle.cpp +++ b/src/tracks/ui/BrushHandle.cpp @@ -142,7 +142,7 @@ BrushHandle::BrushHandle( const TrackPanelMouseState &st, const ViewInfo &viewInfo, const std::shared_ptr &pSpectralData, const ProjectSettings &pSettings -) : mpStateSaver{ move(pStateSaver) } +) : mpStateSaver{ std::move(pStateSaver) } , mpSpectralData(pSpectralData) , mpView{ pChannelView } { diff --git a/src/tracks/ui/CommonTrackPanelCell.h b/src/tracks/ui/CommonTrackPanelCell.h index a73b9d322..c7dbdb8f2 100644 --- a/src/tracks/ui/CommonTrackPanelCell.h +++ b/src/tracks/ui/CommonTrackPanelCell.h @@ -57,7 +57,7 @@ public: MenuItem() = default; MenuItem( const Identifier &internal, const TranslatableString &msgid, Action action = {}, bool enabled = true ) - : symbol{ internal, msgid }, action{ move(action) }, enabled{ enabled } + : symbol{ internal, msgid }, action{ std::move(action) }, enabled{ enabled } {} ComponentInterfaceSymbol symbol; diff --git a/src/tracks/ui/EnvelopeHandle.cpp b/src/tracks/ui/EnvelopeHandle.cpp index 6a468e268..5a65b3eac 100644 --- a/src/tracks/ui/EnvelopeHandle.cpp +++ b/src/tracks/ui/EnvelopeHandle.cpp @@ -35,7 +35,7 @@ Paul Licameli split from TrackPanel.cpp EnvelopeHandle::EnvelopeHandle(Envelope *pEnvelope, std::weak_ptr wChannel ) : mEnvelope{ pEnvelope } - , mwChannel{ move(wChannel) } + , mwChannel{ std::move(wChannel) } { } @@ -58,7 +58,7 @@ UIHandlePtr EnvelopeHandle::HitAnywhere(std::weak_ptr &holder, Envelope *envelope, std::weak_ptr wChannel, bool timeTrack) { auto result = AssignUIHandlePtr(holder, - std::make_shared(envelope, move(wChannel))); + std::make_shared(envelope, std::move(wChannel))); result->mTimeTrack = timeTrack; return result; } @@ -176,7 +176,7 @@ UIHandlePtr EnvelopeHandle::HitEnvelope(std::weak_ptr &holder, if (distance >= yTolerance) return {}; - return HitAnywhere(holder, envelope, move(wChannel), timeTrack); + return HitAnywhere(holder, envelope, std::move(wChannel), timeTrack); } UIHandle::Result EnvelopeHandle::Click diff --git a/src/tracks/ui/TimeShiftHandle.cpp b/src/tracks/ui/TimeShiftHandle.cpp index 504766093..f2625dcee 100644 --- a/src/tracks/ui/TimeShiftHandle.cpp +++ b/src/tracks/ui/TimeShiftHandle.cpp @@ -502,7 +502,7 @@ UIHandle::Result TimeShiftHandle::Click( auto &trackList = TrackList::Get(*pProject); mClipMoveState.Init(*pProject, *pTrack, - hitTestResult, move(pShifter), clickTime, + hitTestResult, std::move(pShifter), clickTime, viewInfo, trackList, SyncLockState::Get( *pProject ).IsSyncLocked() ); diff --git a/src/widgets/CustomUpdater.h b/src/widgets/CustomUpdater.h index c9147efe5..4a9269f62 100644 --- a/src/widgets/CustomUpdater.h +++ b/src/widgets/CustomUpdater.h @@ -30,9 +30,9 @@ public: RulerUpdater::Labels minorMinorLabels ) { - mMajorLabels = move(majorLabels); - mMinorLabels = move(minorLabels); - mMinorMinorLabels = move(minorMinorLabels); + mMajorLabels = std::move(majorLabels); + mMinorLabels = std::move(minorLabels); + mMinorMinorLabels = std::move(minorMinorLabels); } protected: diff --git a/src/widgets/PopupMenuTable.h b/src/widgets/PopupMenuTable.h index e6cb83e7e..a82c44cab 100644 --- a/src/widgets/PopupMenuTable.h +++ b/src/widgets/PopupMenuTable.h @@ -178,7 +178,7 @@ private: template void RegisterItem( const Registry::Placement &placement, Ptr pItem) { - Registry::RegisterItem(*mRegistry, placement, move(pItem)); + Registry::RegisterItem(*mRegistry, placement, std::move(pItem)); } protected: