Core/Utilities: Forward parameters of StringFormat correctly to fmt::sprintf.
(cherry picked from commit 11dfd9e7d4967aaa2dcecc6d4f7a8ac21b4013fd)
This commit is contained in:
1 parent
45058990e2
commit
1741bfc64e
1 file changed
+4
-4
@@ -23,11 +23,11 @@
|
|||||||
|
|
||||||
namespace Trinity
|
namespace Trinity
|
||||||
{
|
{
|
||||||
//! Default TC string format function
|
/// Default TC string format function.
|
||||||
template<typename... Args>
|
template<typename Format, typename... Args>
|
||||||
inline std::string StringFormat(const char* fmt, Args const&... 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