Browse Source

Fix compile error of 'WARN_PRINT' and 'ERR_PRINT'.

cannot pass non-trivial object of type 'godot::String' to variadic function; expected type from format string was 'char *' [-Wnon-pod-varargs]
xfx 7 năm trước cách đây
mục cha
commit
e909f800d0
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      include/core/Defs.hpp

+ 2 - 2
include/core/Defs.hpp

@@ -113,7 +113,7 @@ typedef float real_t;
 #endif
 
 #ifndef WARN_PRINTS
-#define WARN_PRINTS(msg) WARN_PRINT(msg.utf8().get_data())
+#define WARN_PRINTS(msg) WARN_PRINT((msg).utf8().get_data())
 #endif
 
 #ifndef ERR_PRINT
@@ -121,7 +121,7 @@ typedef float real_t;
 #endif
 
 #ifndef ERR_PRINTS
-#define ERR_PRINTS(msg) ERR_PRINT(msg.utf8().get_data())
+#define ERR_PRINTS(msg) ERR_PRINT((msg).utf8().get_data())
 #endif
 
 #ifndef ERR_FAIL