fix: Local variable 'pex' will be copied despite being returned by name (#6300)
This commit is contained in:
parent
089a697809
commit
98b3e819ca
|
@ -388,7 +388,7 @@ private:
|
|||
};
|
||||
|
||||
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)
|
||||
|
|
|
@ -143,7 +143,7 @@ public:
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue