1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Use perfect forwarding

This commit is contained in:
Chocobo1 2023-05-05 01:46:08 +08:00
parent 5c38cc00d9
commit 15de7aed9a
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -42,7 +42,7 @@ constexpr typename std::add_const_t<T> &asConst(T &t) noexcept { return t; }
// Forward rvalue as const
template <typename T>
constexpr typename std::add_const_t<T> asConst(T &&t) noexcept { return std::move(t); }
constexpr typename std::add_const_t<T> asConst(T &&t) noexcept { return std::forward<T>(t); }
// Prevent const rvalue arguments
template <typename T>