Fixed crash + debug build on windows

This commit is contained in:
Anonymous275
2021-02-21 22:19:30 +02:00
committed by Anonymous275
parent 218504e674
commit 0580ad67fd
4 changed files with 8 additions and 6 deletions

View File

@@ -76,14 +76,14 @@ static inline void luaprint(const std::string& str) {
}
#else // DEBUG
#define warn(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [WARN] ") + (x))
#define info(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [INFO] ") + (x))
#define error(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [ERROR] ") + (x))
#define luaprint(x) Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [LUA] ") + (x))
#define warn(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [WARN] ") + (x))
#define info(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [INFO] ") + (x))
#define error(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [ERROR] ") + (x))
#define luaprint(x) Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [LUA] ") + (x))
#define debug(x) \
do { \
if (Application::Settings.DebugModeEnabled) { \
Application::Console().Write(std::string(__PRETTY_FUNCTION__) + ":" + std::to_string(__LINE__) + std::string(" [DEBUG] ") + (x)); \
Application::Console().Write(std::string(__func__) + ":" + std::to_string(__LINE__) + std::string(" [DEBUG] ") + (x)); \
} \
} while (false)
#endif // DEBUG