From c5f22269a8ae5ea491f36d9fc5a92ddb495433bc Mon Sep 17 00:00:00 2001 From: Malcolm Tyrrell Date: Thu, 13 May 2021 10:33:25 +0100 Subject: [PATCH] LogAux --- include/assimp/LogAux.h | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/include/assimp/LogAux.h b/include/assimp/LogAux.h index b0a1f9ddd..6ca1912d3 100644 --- a/include/assimp/LogAux.h +++ b/include/assimp/LogAux.h @@ -64,13 +64,14 @@ public: template static void ThrowException(T&&... args) { - throw DeadlyImportError(Prefix(), args...); + throw DeadlyImportError(Prefix(), std::forward(args)...); } // ------------------------------------------------------------------------------------------------ - static void LogWarn(const Formatter::format& message) { + template + static void LogWarn(T&&... args) { if (!DefaultLogger::isNullLogger()) { - ASSIMP_LOG_WARN(Prefix()+(std::string)message); + ASSIMP_LOG_WARN(Prefix(), std::forward(args)...); } } @@ -104,13 +105,6 @@ public: // https://sourceforge.net/tracker/?func=detail&atid=1067632&aid=3358562&group_id=226462 #if !defined(__GNUC__) || !defined(__APPLE__) || __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) - // ------------------------------------------------------------------------------------------------ - static void LogWarn (const char* message) { - if (!DefaultLogger::isNullLogger()) { - LogWarn(Formatter::format(message)); - } - } - // ------------------------------------------------------------------------------------------------ static void LogError (const char* message) { if (!DefaultLogger::isNullLogger()) {