namspace Assimp
{
- template< > const std::string LogFunctions< BlenderTessellatorGL >::log_prefix = "BLEND_TESS_GL: ";
+ template< > const char* LogFunctions< BlenderTessellatorGL >::Prefix()
+ {
+ static auto prefix = "BLEND_TESS_GL: ";
+ return prefix;
+ }
}
using namespace Assimp;
namespace Assimp
{
- template< > const std::string LogFunctions< BlenderTessellatorP2T >::log_prefix = "BLEND_TESS_P2T: ";
+ template< > const char* LogFunctions< BlenderTessellatorP2T >::Prefix()
+ {
+ static auto prefix = "BLEND_TESS_P2T: ";
+ return prefix;
+ }
}
using namespace Assimp;
// ------------------------------------------------------------------------------------------------
static void ThrowException(const std::string& msg)
{
- throw DeadlyImportError(log_prefix+msg);
+ throw DeadlyImportError(Prefix()+msg);
}
// ------------------------------------------------------------------------------------------------
static void LogWarn(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->warn(log_prefix+(std::string)message);
+ DefaultLogger::get()->warn(Prefix() +(std::string)message);
}
}
// ------------------------------------------------------------------------------------------------
static void LogError(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->error(log_prefix+(std::string)message);
+ DefaultLogger::get()->error(Prefix() +(std::string)message);
}
}
// ------------------------------------------------------------------------------------------------
static void LogInfo(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->info(log_prefix+(std::string)message);
+ DefaultLogger::get()->info(Prefix() +(std::string)message);
}
}
// ------------------------------------------------------------------------------------------------
static void LogDebug(const Formatter::format& message) {
if (!DefaultLogger::isNullLogger()) {
- DefaultLogger::get()->debug(log_prefix+(std::string)message);
+ DefaultLogger::get()->debug(Prefix() +(std::string)message);
}
}
#endif
private:
-
- static const std::string log_prefix;
+ static const char* Prefix();
};
};
namespace Assimp { // this has to be in here because LogFunctions is in ::Assimp
-template<> const std::string LogFunctions<XGLImporter>::log_prefix = "XGL: ";
-
+ template<> const char* LogFunctions<XGLImporter>::Prefix()
+ {
+ static auto prefix = "XGL: ";
+ return prefix;
+ }
}
static const aiImporterDesc desc = {