summaryrefslogtreecommitdiffstats
path: root/include/godot_cpp/core/Defs.hpp
diff options
context:
space:
mode:
authorKarroffel <therzog@mail.de>2017-03-15 18:13:22 +0100
committerKarroffel <therzog@mail.de>2017-03-15 18:13:29 +0100
commitbce9ac109d63d67c3e7f0b25df8aa9d72e094d1b (patch)
tree681da6ad6b24e08c1189047cd6513bb2dfb27817 /include/godot_cpp/core/Defs.hpp
parentb0981479779f2deb3beb2fca5507453d78572bdb (diff)
downloadredot-cpp-bce9ac109d63d67c3e7f0b25df8aa9d72e094d1b.tar.gz
mistakes were made. I undid them.
Diffstat (limited to 'include/godot_cpp/core/Defs.hpp')
-rw-r--r--include/godot_cpp/core/Defs.hpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/include/godot_cpp/core/Defs.hpp b/include/godot_cpp/core/Defs.hpp
index cdb67a1..b2da2cc 100644
--- a/include/godot_cpp/core/Defs.hpp
+++ b/include/godot_cpp/core/Defs.hpp
@@ -60,7 +60,7 @@ enum Error {
}
-// @Todo error handling stuff here plz
+#include <stdio.h>
typedef float real_t;
@@ -87,19 +87,16 @@ typedef float real_t;
#ifndef ERR_PRINT
-#define ERR_PRINT(msg)
+#define ERR_PRINT(msg) fprintf(stderr, "ERROR: %ls\n", (msg).c_string())
#endif
#ifndef ERR_FAIL_INDEX_V
#define ERR_FAIL_INDEX_V(a, b, c)
#endif
-#ifndef ERR_FAIL_INDEX
-#define ERR_FAIL_INDEX(a, b)
-#endif
#ifndef ERR_FAIL_COND
-#define ERR_FAIL_COND(a)
+#define ERR_FAIL_COND(a) do { if (a) { fprintf(stderr, #a); return; } } while(0)
#endif