Browse Source

Make GCC more happy.

Godzil 3 years ago
parent
commit
bdad9bb8b7
5 changed files with 8 additions and 3 deletions
  1. 1 0
      source/ECS.cpp
  2. 1 0
      source/Game.cpp
  3. 3 2
      source/Logger.cpp
  4. 1 0
      source/include/ECS.h
  5. 2 1
      source/include/Logger.h

+ 1 - 0
source/ECS.cpp

@@ -8,6 +8,7 @@
  */
 
 #include <Logger.h>
+#include <algorithm>
 #include <ECS.h>
 
 /* Entity */

+ 1 - 0
source/Game.cpp

@@ -9,6 +9,7 @@
 #include <SDL.h>
 #include <SDL_image.h>
 #include <glm/glm.hpp>
+#include <stdlib.h>
 
 #include <memory>
 

+ 3 - 2
source/Logger.cpp

@@ -7,6 +7,7 @@
  * Created by Manoël Trapier on 11/02/2021.
  */
 #include <stdio.h>
+#include <stdlib.h>
 #include <stdint.h>
 #include <stdarg.h>
 #include <time.h>
@@ -21,10 +22,10 @@ typedef struct logData
 
 static logData dataTable[] =
 {
-    [LOG_INFO] = { "INFO", 36 },
+    [LOG_LOG] = { "LOG", 32 },
     [LOG_ERROR] = { "ERROR", 31 },
     [LOG_WARNING] = { "WARN", 33 },
-    [LOG_LOG] = { "LOG", 32 },
+    [LOG_INFO] = { "INFO", 36 },
     [LOG_CRITICAL] = { "CRITIC", 101 },
     [LOG_DEBUG] = { "DEBUG", 35 },
 };

+ 1 - 0
source/include/ECS.h

@@ -17,6 +17,7 @@
 #include <unordered_map>
 #include <typeindex>
 #include <set>
+#include <memory>
 
 #include <Logger.h>
 #include <Pool.h>

+ 2 - 1
source/include/Logger.h

@@ -10,11 +10,12 @@
 #ifndef GAMEENGINE_LOGGER_H
 #define GAMEENGINE_LOGGER_H
 
+#include <time.h>
 #include <vector>
 
 typedef enum LogType
 {
-    LOG_LOG,
+    LOG_LOG = 0,
     LOG_ERROR,
     LOG_WARNING,
     LOG_INFO,