mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 08:28:32 +01:00
Core/Utilities: Forward parameters of StringFormat correctly to fmt::sprintf.
(cherry picked from commit 11dfd9e7d4)
This commit is contained in:
@@ -23,11 +23,11 @@
|
||||
|
||||
namespace Trinity
|
||||
{
|
||||
//! Default TC string format function
|
||||
template<typename... Args>
|
||||
inline std::string StringFormat(const char* fmt, Args const&... args)
|
||||
/// Default TC string format function.
|
||||
template<typename Format, typename... Args>
|
||||
inline std::string StringFormat(Format&& fmt, Args&&... args)
|
||||
{
|
||||
return fmt::sprintf(fmt, args...);
|
||||
return fmt::sprintf(std::forward<Format>(fmt), std::forward<Args>(args)...);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user