Skip to content

Commit

Permalink
Don't move local objects to ease copy elision
Browse files Browse the repository at this point in the history
  • Loading branch information
gvnnz committed Mar 7, 2019
1 parent 48f506c commit 0d8f174
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/core/pluginManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ std::unique_ptr<Plugin> makePlugin(const string& fid)
}
gu_log("[pluginManager::makePlugin] plugin instance with fid=%s created\n", fid.c_str());

return std::move(std::make_unique<Plugin>(pi, samplerate_, buffersize_));
return std::make_unique<Plugin>(pi, samplerate_, buffersize_);
}


Expand Down Expand Up @@ -252,7 +252,7 @@ std::unique_ptr<Plugin> makePlugin(const Plugin& src)
for (int i=0; i<src.getNumParameters(); i++)
p->setParameter(i, src.getParameter(i));

return std::move(p);
return p;
}


Expand Down
4 changes: 2 additions & 2 deletions src/core/waveManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ std::unique_ptr<Wave> createEmpty(int frames, int channels, int samplerate,
gu_log("[waveManager::createEmpty] new empty Wave created, %d frames\n",
wave->getSize());

return std::move(wave);
return wave;
}


Expand All @@ -142,7 +142,7 @@ std::unique_ptr<Wave> createFromWave(const Wave* src, int a, int b)

gu_log("[waveManager::createFromWave] new Wave created, %d frames\n", frames);

return std::move(wave);
return wave;
}


Expand Down

0 comments on commit 0d8f174

Please sign in to comment.