Преглед на файлове

add missing includes and defines for linux compilation

fix a warning with string cast
Carsten Teibes преди 10 години
родител
ревизия
0551ac927e
променени са 4 файла, в които са добавени 6 реда и са изтрити 3 реда
  1. 1
    0
      src/Menu.cpp
  2. 1
    0
      src/SkeletalModel.cpp
  3. 1
    0
      src/World.cpp
  4. 3
    3
      src/utils/strings.cpp

+ 1
- 0
src/Menu.cpp Целия файл

@@ -7,6 +7,7 @@
7 7
 
8 8
 #include <assert.h>
9 9
 #include <dirent.h>
10
+#include <cctype>
10 11
 
11 12
 #ifdef __APPLE__
12 13
 #include <OpenGL/gl.h>

+ 1
- 0
src/SkeletalModel.cpp Целия файл

@@ -6,6 +6,7 @@
6 6
  * \author xythobuz
7 7
  */
8 8
 
9
+#include <cstddef>
9 10
 #include "SkeletalModel.h"
10 11
 
11 12
 SkeletalModel::SkeletalModel() {

+ 1
- 0
src/World.cpp Целия файл

@@ -5,6 +5,7 @@
5 5
  * \author Mongoose
6 6
  */
7 7
 
8
+#include <cstdio>
8 9
 #include <math.h>
9 10
 #include <assert.h>
10 11
 

+ 3
- 3
src/utils/strings.cpp Целия файл

@@ -11,7 +11,7 @@
11 11
 #include <string.h>
12 12
 #include <assert.h>
13 13
 
14
-#if defined(unix) || defined(__APPLE__)
14
+#if defined(unix) || defined(__APPLE__) || defined(__linux__)
15 15
 #include <wordexp.h>
16 16
 #endif
17 17
 
@@ -31,7 +31,7 @@ char *stringRemoveQuotes(const char *s) {
31 31
 }
32 32
 
33 33
 char *stringReplace(const char *s, const char *search, const char *replace) {
34
-    char *tmp = strstr(s, search);
34
+    char *tmp = strstr((char *)s, search);
35 35
     if (tmp == NULL)
36 36
         return NULL;
37 37
     size_t offset = tmp - s;
@@ -130,7 +130,7 @@ char *fullPath(const char *path, char end) {
130 130
     assert(path[0] != '\0');
131 131
 
132 132
     if (path[0] == '~') {
133
-#if defined(unix) || defined(__APPLE__)
133
+#if defined(unix) || defined(__APPLE__) || defined(__linux__)
134 134
 
135 135
 #ifdef __APPLE__
136 136
         // Workaround for Mac OS X. See:

Loading…
Отказ
Запис