aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaios <naios-dev@live.de>2015-07-21 20:49:32 +0200
committerNaios <naios-dev@live.de>2015-07-22 02:00:05 +0200
commit1741bfc64ee13de0310ccce7a98bc0084476cc66 (patch)
treef0c976ab4dd189737294af16954a5070d1f7a584
parent45058990e2d5b41ea80c32db350125f47456e0e8 (diff)
Core/Utilities: Forward parameters of StringFormat correctly to fmt::sprintf.
(cherry picked from commit 11dfd9e7d4967aaa2dcecc6d4f7a8ac21b4013fd)
-rw-r--r--src/server/shared/Utilities/StringFormat.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/shared/Utilities/StringFormat.h b/src/server/shared/Utilities/StringFormat.h
index 70d9aefb14d..0e9dde471da 100644
--- a/src/server/shared/Utilities/StringFormat.h
+++ b/src/server/shared/Utilities/StringFormat.h
@@ -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)...);
}
}