Core/Utilities: Forward parameters of StringFormat correctly to fmt::sprintf.

This commit is contained in:
Naios
2015-07-21 20:49:32 +02:00
parent 6bf10c2b83
commit 11dfd9e7d4

View File

@@ -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)...);
}
}