mirror of
https://github.com/transmission/transmission
synced 2025-03-18 01:35:35 +00:00
fix: Local variable 'pex' will be copied despite being returned by name (#6300)
This commit is contained in:
parent
089a697809
commit
98b3e819ca
2 changed files with 2 additions and 2 deletions
|
@ -388,7 +388,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
pex.erase(std::remove_if(std::begin(pex), std::end(pex), IsBadPex), std::end(pex));
|
pex.erase(std::remove_if(std::begin(pex), std::end(pex), IsBadPex), std::end(pex));
|
||||||
return pex;
|
return std::move(pex);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void callback(void* vself, int event, unsigned char const* info_hash, void const* data, size_t data_len)
|
static void callback(void* vself, int event, unsigned char const* info_hash, void const* data, size_t data_len)
|
||||||
|
|
|
@ -143,7 +143,7 @@ public:
|
||||||
return { iter->second, false };
|
return { iter->second, false };
|
||||||
}
|
}
|
||||||
|
|
||||||
return { vec_.emplace_back(key, tr_variant{ std::move(val) }).second, true };
|
return { vec_.emplace_back(key, tr_variant{ std::forward<Val>(val) }).second, true };
|
||||||
}
|
}
|
||||||
|
|
||||||
// --- custom functions
|
// --- custom functions
|
||||||
|
|
Loading…
Add table
Reference in a new issue