mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-15 02:36:16 +02:00
fix(treewide): fix incorrect usage of std::move
`auto &&` and `T &&` are forwarding references and can be either lvalue or rvalue references. Moving from universal references is incorrect and should not be done. Moving from integral or floating-point values is pointless and just worsens debug performance.
This commit is contained in:
parent
492c678162
commit
17b49134fa
3 changed files with 3 additions and 3 deletions
|
@ -153,7 +153,7 @@ struct curlFileTransfer : public FileTransfer
|
||||||
template<class T>
|
template<class T>
|
||||||
void fail(T && e)
|
void fail(T && e)
|
||||||
{
|
{
|
||||||
failEx(std::make_exception_ptr(std::move(e)));
|
failEx(std::make_exception_ptr(std::forward<T>(e)));
|
||||||
}
|
}
|
||||||
|
|
||||||
LambdaSink finalSink;
|
LambdaSink finalSink;
|
||||||
|
|
|
@ -33,7 +33,7 @@ Machine::Machine(
|
||||||
systemTypes(systemTypes),
|
systemTypes(systemTypes),
|
||||||
sshKey(sshKey),
|
sshKey(sshKey),
|
||||||
maxJobs(maxJobs),
|
maxJobs(maxJobs),
|
||||||
speedFactor(speedFactor == 0.0f ? 1.0f : std::move(speedFactor)),
|
speedFactor(speedFactor == 0.0f ? 1.0f : speedFactor),
|
||||||
supportedFeatures(supportedFeatures),
|
supportedFeatures(supportedFeatures),
|
||||||
mandatoryFeatures(mandatoryFeatures),
|
mandatoryFeatures(mandatoryFeatures),
|
||||||
sshPublicHostKey(sshPublicHostKey)
|
sshPublicHostKey(sshPublicHostKey)
|
||||||
|
|
|
@ -35,7 +35,7 @@ ExecutablePath ExecutablePath::parse(const OsString & path)
|
||||||
std::make_move_iterator(strings.begin()),
|
std::make_move_iterator(strings.begin()),
|
||||||
std::make_move_iterator(strings.end()),
|
std::make_move_iterator(strings.end()),
|
||||||
std::back_inserter(ret),
|
std::back_inserter(ret),
|
||||||
[](auto && str) {
|
[](OsString && str) {
|
||||||
return fs::path{
|
return fs::path{
|
||||||
str.empty()
|
str.empty()
|
||||||
// "A zero-length prefix is a legacy feature that
|
// "A zero-length prefix is a legacy feature that
|
||||||
|
|
Loading…
Reference in a new issue