From 681435f6f1001df8e106b6d1f2a5bc59bf4115c8 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Thu, 1 Feb 2018 16:40:12 +0000 Subject: Adding preprocessor stuff to make it compatible with windows --- yage/core/loglevel.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'yage/core') diff --git a/yage/core/loglevel.h b/yage/core/loglevel.h index 2247375d..bb115bbf 100644 --- a/yage/core/loglevel.h +++ b/yage/core/loglevel.h @@ -28,8 +28,20 @@ enum class LogLevel { /// Warning message. WARNING, +#ifdef _WIN32 +#ifdef ERROR +#define YAGE_ERROR_TMP ERROR +#undef ERROR +#endif +#endif /// Error message. ERROR, +#ifdef _WIN32 +#ifdef YAGE_ERROR_TMP +#define ERROR YAGE_ERROR_TMP +#undef YAGE_ERROR_TMP +#endif +#endif /// Fatal message that should be output when the game /// crashes. -- cgit From 0b609923f0f4bf4de49178f1bd98c4eb2cd421c1 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 3 Feb 2018 18:27:05 +0000 Subject: [Doc] Making windows compatibilty more readable. --- yage/core/loglevel.h | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'yage/core') diff --git a/yage/core/loglevel.h b/yage/core/loglevel.h index bb115bbf..51d28398 100644 --- a/yage/core/loglevel.h +++ b/yage/core/loglevel.h @@ -9,6 +9,13 @@ #ifndef YAGE_CORE_LOGLEVEL_H #define YAGE_CORE_LOGLEVEL_H +#ifdef _WIN32 +#ifdef ERROR +#define YAGE_ERROR_TMP ERROR +#undef ERROR +#endif +#endif + namespace yage { @@ -28,20 +35,8 @@ enum class LogLevel { /// Warning message. WARNING, -#ifdef _WIN32 -#ifdef ERROR -#define YAGE_ERROR_TMP ERROR -#undef ERROR -#endif -#endif /// Error message. ERROR, -#ifdef _WIN32 -#ifdef YAGE_ERROR_TMP -#define ERROR YAGE_ERROR_TMP -#undef YAGE_ERROR_TMP -#endif -#endif /// Fatal message that should be output when the game /// crashes. @@ -49,4 +44,11 @@ enum class LogLevel { }; } +#ifdef _WIN32 +#ifdef YAGE_ERROR_TMP +#define ERROR YAGE_ERROR_TMP +#undef YAGE_ERROR_TMP +#endif +#endif + #endif -- cgit