Bladeren bron

clang compile\warning fixes

Ivan Savenko 12 jaren geleden
bovenliggende
commit
0d3ec3c6da
5 gewijzigde bestanden met toevoegingen van 6 en 6 verwijderingen
  1. 2 2
      Global.h
  2. 1 1
      lib/Logging/CLogConsoleTarget.h
  3. 1 1
      lib/Logging/CLogFormatter.h
  4. 1 1
      lib/Logging/CLogger.h
  5. 1 1
      lib/Logging/ILogTarget.h

+ 2 - 2
Global.h

@@ -40,12 +40,12 @@ static_assert(sizeof(bool) == 1, "Bool needs to be 1 byte in size.");
 #endif
 
 //nullptr -  only msvc and gcc-4.6 or later, othervice define it  as NULL
-#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 460))
+#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 460)) && !(defined(__clang__))
 #define nullptr NULL
 #endif
 
 //override keyword - only msvc and gcc-4.7 or later.
-#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 470))
+#if !defined(_MSC_VER) && !(defined(__GNUC__) && (GCC_VERSION >= 470)) && !(defined(__clang__))
 #define override
 #endif
 

+ 1 - 1
lib/Logging/CLogConsoleTarget.h

@@ -16,7 +16,7 @@
 #include "CLogFormatter.h"
 #include "CConsoleHandler.h"
 
-class LogRecord;
+struct LogRecord;
 
 /**
  * The color mapping maps a logger name and a level to a specific color.

+ 1 - 1
lib/Logging/CLogFormatter.h

@@ -11,7 +11,7 @@
 
 #pragma once
 
-class LogRecord;
+struct LogRecord;
 
 /**
  * The log formatter formats log records.

+ 1 - 1
lib/Logging/CLogger.h

@@ -12,7 +12,7 @@
 #pragma once
 
 class CGLogger;
-class LogRecord;
+struct LogRecord;
 class ILogTarget;
 
 namespace ELogLevel

+ 1 - 1
lib/Logging/ILogTarget.h

@@ -11,7 +11,7 @@
 
 #pragma once
 
-class LogRecord;
+struct LogRecord;
 
 /**
  * The interface log target is used by all log target implementations. It holds