mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-04 17:49:45 +02:00
Remove unnecessary std::move in return statements...
... and comment where it is necessary.
This commit is contained in:
parent
4b16705aa5
commit
d783762737
@ -1921,7 +1921,7 @@ std::unique_ptr<wxCmdLineParser> AudacityApp::ParseCommandLine()
|
||||
|
||||
// Run the parser
|
||||
if (parser->Parse() == 0)
|
||||
return std::move(parser);
|
||||
return parser;
|
||||
|
||||
return{};
|
||||
}
|
||||
|
@ -596,7 +596,7 @@ wxFileNameWrapper DirManager::MakeBlockFilePath(const wxString &value) {
|
||||
wxLogSysError(_("mkdir in DirManager::MakeBlockFilePath failed."));
|
||||
}
|
||||
}
|
||||
return std::move(dir);
|
||||
return dir;
|
||||
}
|
||||
|
||||
bool DirManager::AssignFile(wxFileNameWrapper &fileName,
|
||||
@ -921,7 +921,7 @@ wxFileNameWrapper DirManager::MakeBlockFileName()
|
||||
// FIXME: Might we get here without midkey having been set?
|
||||
// Seemed like a possible problem in these changes in .aup directory hierarchy.
|
||||
BalanceFileAdd(midkey);
|
||||
return std::move(ret);
|
||||
return ret;
|
||||
}
|
||||
|
||||
BlockFilePtr DirManager::NewSimpleBlockFile(
|
||||
|
@ -91,7 +91,7 @@ std::unique_ptr<wxImage> ChangeImageColour(wxImage * srcImage,
|
||||
c = (c + 1) % 3;
|
||||
}
|
||||
|
||||
return std::move(dstImage);
|
||||
return dstImage;
|
||||
}
|
||||
|
||||
/// Takes a background image, foreground image, and mask
|
||||
@ -157,7 +157,7 @@ std::unique_ptr<wxImage> OverlayImage(wxImage * background, wxImage * foreground
|
||||
(fg[3 * (y * fgWidth + x) + c] * value)) / 255;
|
||||
}
|
||||
}
|
||||
return std::move(dstImage);
|
||||
return dstImage;
|
||||
}
|
||||
|
||||
/// Takes a background image, foreground image, and mask
|
||||
@ -253,7 +253,7 @@ std::unique_ptr<wxImage> CreateBackground(int width, int height, wxColour colour
|
||||
*ip++ = srcVal[2];
|
||||
}
|
||||
|
||||
return std::move(i);
|
||||
return i;
|
||||
}
|
||||
|
||||
// Creates an image with the Mac OS X Aqua stripes, to be used
|
||||
@ -272,7 +272,7 @@ std::unique_ptr<wxImage> CreateAquaBackground(int width, int height, int offset)
|
||||
*ip++ = v;
|
||||
}
|
||||
|
||||
return std::move(image);
|
||||
return image;
|
||||
}
|
||||
|
||||
std::unique_ptr<wxImage> CreateSysBackground
|
||||
|
@ -2337,7 +2337,7 @@ Track::Holder LabelTrack::Cut(double t0, double t1)
|
||||
if (!Clear(t0, t1))
|
||||
return{};
|
||||
|
||||
return std::move(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -2351,7 +2351,7 @@ Track::Holder LabelTrack::SplitCut(double t0, double t1)
|
||||
if (!SplitDelete(t0, t1))
|
||||
return {};
|
||||
|
||||
return std::move(tmp);
|
||||
return tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -2402,6 +2402,7 @@ Track::Holder LabelTrack::Copy(double t0, double t1) const
|
||||
}
|
||||
lt->mClipLen = (t1 - t0);
|
||||
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(tmp);
|
||||
}
|
||||
|
||||
|
@ -164,6 +164,7 @@ Track::Holder NoteTrack::Duplicate() const
|
||||
#ifdef EXPERIMENTAL_MIDI_OUT
|
||||
duplicate->SetGain(GetGain());
|
||||
#endif
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(duplicate);
|
||||
}
|
||||
|
||||
@ -452,6 +453,7 @@ Track::Holder NoteTrack::Cut(double t0, double t1)
|
||||
//(mBottomNote, mDirManager, mLastMidiPosition,
|
||||
// mSerializationBuffer, mSerializationLength, mVisibleChannels)
|
||||
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(newTrack);
|
||||
}
|
||||
|
||||
@ -473,6 +475,7 @@ Track::Holder NoteTrack::Copy(double t0, double t1) const
|
||||
//(mBottomNote, mDirManager, mLastMidiPosition,
|
||||
// mSerializationBuffer, mSerializationLength, mVisibleChannels)
|
||||
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(newTrack);
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,7 @@ Track::Holder WaveTrack::Cut(double t0, double t1)
|
||||
if (!Clear(t0, t1))
|
||||
return{};
|
||||
|
||||
return std::move(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
Track::Holder WaveTrack::SplitCut(double t0, double t1)
|
||||
@ -548,7 +548,7 @@ Track::Holder WaveTrack::SplitCut(double t0, double t1)
|
||||
if (!SplitDelete(t0, t1))
|
||||
return{};
|
||||
|
||||
return std::move(tmp);
|
||||
return tmp;
|
||||
}
|
||||
|
||||
#if 0
|
||||
@ -564,7 +564,7 @@ Track::Holder WaveTrack::CutAndAddCutLine(double t0, double t1)
|
||||
if (!ClearAndAddCutLine(t0, t1))
|
||||
return {};
|
||||
|
||||
return std::move(tmp);
|
||||
return tmp;
|
||||
}
|
||||
#endif
|
||||
|
||||
@ -706,7 +706,7 @@ Track::Holder WaveTrack::Copy(double t0, double t1) const
|
||||
}
|
||||
}
|
||||
|
||||
return std::move(result);
|
||||
return result;
|
||||
}
|
||||
|
||||
Track::Holder WaveTrack::CopyNonconst(double t0, double t1)
|
||||
|
@ -125,6 +125,7 @@ public:
|
||||
{
|
||||
auto v = std::make_unique<OptionValidator>();
|
||||
v->mOptions = mOptions;
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(v);
|
||||
}
|
||||
};
|
||||
|
@ -333,6 +333,7 @@ std::unique_ptr<ImportFileHandle> FFmpegImportPlugin::Open(const wxString &filen
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(handle);
|
||||
}
|
||||
|
||||
|
@ -332,6 +332,7 @@ std::unique_ptr<ImportFileHandle> FLACImportPlugin::Open(const wxString &filenam
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(handle);
|
||||
}
|
||||
|
||||
|
@ -418,6 +418,7 @@ std::unique_ptr<ImportFileHandle> GStreamerImportPlugin::Open(const wxString &fi
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(handle);
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ movable_ptr<ODTask> ODComputeSummaryTask::Clone() const
|
||||
{
|
||||
auto clone = make_movable<ODComputeSummaryTask>();
|
||||
clone->mDemandSample = GetDemandSample();
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(clone);
|
||||
}
|
||||
|
||||
|
@ -149,6 +149,7 @@ movable_ptr<ODTask> ODDecodeFFmpegTask::Clone() const
|
||||
clone->mDemandSample=GetDemandSample();
|
||||
|
||||
//the decoders and blockfiles should not be copied. They are created as the task runs.
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(clone);
|
||||
}
|
||||
|
||||
|
@ -39,6 +39,7 @@ movable_ptr<ODTask> ODDecodeFlacTask::Clone() const
|
||||
clone->mDemandSample = GetDemandSample();
|
||||
|
||||
//the decoders and blockfiles should not be copied. They are created as the task runs.
|
||||
// This std::move is needed to "upcast" the pointer type
|
||||
return std::move(clone);
|
||||
}
|
||||
|
||||
|
@ -165,7 +165,7 @@ public:
|
||||
path.reserve(mIters.size());
|
||||
for (const auto &triple : mIters)
|
||||
path.push_back(triple.current - triple.begin);
|
||||
return std::move(path);
|
||||
return path;
|
||||
}
|
||||
|
||||
friend inline bool operator ==
|
||||
|
@ -576,7 +576,7 @@ void AButton::SetControl(bool control)
|
||||
|
||||
auto AButton::TemporarilyAllowFocus() -> TempAllowFocus {
|
||||
s_AcceptsFocus = true;
|
||||
return std::move(TempAllowFocus{ &s_AcceptsFocus });
|
||||
return TempAllowFocus{ &s_AcceptsFocus };
|
||||
}
|
||||
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
|
@ -1743,7 +1743,7 @@ bool ASlider::s_AcceptsFocus{ false };
|
||||
|
||||
auto ASlider::TemporarilyAllowFocus() -> TempAllowFocus {
|
||||
s_AcceptsFocus = true;
|
||||
return std::move(TempAllowFocus{ &s_AcceptsFocus });
|
||||
return TempAllowFocus{ &s_AcceptsFocus };
|
||||
}
|
||||
|
||||
// This compensates for a but in wxWidgets 3.0.2 for mac:
|
||||
|
@ -2080,7 +2080,7 @@ bool Meter::s_AcceptsFocus{ false };
|
||||
|
||||
auto Meter::TemporarilyAllowFocus() -> TempAllowFocus {
|
||||
s_AcceptsFocus = true;
|
||||
return std::move(TempAllowFocus{ &s_AcceptsFocus });
|
||||
return TempAllowFocus{ &s_AcceptsFocus };
|
||||
}
|
||||
|
||||
// This compensates for a but in wxWidgets 3.0.2 for mac:
|
||||
|
@ -3370,7 +3370,7 @@ bool AdornedRulerPanel::s_AcceptsFocus{ false };
|
||||
|
||||
auto AdornedRulerPanel::TemporarilyAllowFocus() -> TempAllowFocus {
|
||||
s_AcceptsFocus = true;
|
||||
return std::move(TempAllowFocus{ &s_AcceptsFocus });
|
||||
return TempAllowFocus{ &s_AcceptsFocus };
|
||||
}
|
||||
|
||||
void AdornedRulerPanel::SetFocusFromKbd()
|
||||
|
Loading…
x
Reference in New Issue
Block a user