diff options
author | Nickolai Korshunov <n.a.korshunov@gmail.com> | 2018-02-23 15:50:41 +0300 |
---|---|---|
committer | Nickolai Korshunov <n.a.korshunov@gmail.com> | 2018-02-23 15:50:41 +0300 |
commit | e123650d76d4554a3b3db373594714c62f83fa2c (patch) | |
tree | f64fd78e4cef5abd3ffb932d026c8921a618742a | |
parent | 73a67b16b1904b3cfaa8c1f1f9891cd9d416cb43 (diff) | |
download | redot-cpp-e123650d76d4554a3b3db373594714c62f83fa2c.tar.gz |
Strict enums
-rw-r--r-- | binding_generator.py | 2 | ||||
-rw-r--r-- | include/core/Defs.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/binding_generator.py b/binding_generator.py index 54c56f2..60dfb7a 100644 --- a/binding_generator.py +++ b/binding_generator.py @@ -131,7 +131,7 @@ def generate_class_header(used_classes, c): source.append("\n\t// enums") for enum in c["enums"]: - source.append("\tenum " + strip_name(enum["name"]) + " {") + source.append("\tenum class " + strip_name(enum["name"]) + " {") for value in enum["values"]: source.append("\t\t" + remove_nested_type_prefix(value) + " = " + str(enum["values"][value]) + ",") enum_values.append(value) diff --git a/include/core/Defs.hpp b/include/core/Defs.hpp index f8c76d3..4b73cfa 100644 --- a/include/core/Defs.hpp +++ b/include/core/Defs.hpp @@ -4,7 +4,7 @@ namespace godot { -enum Error { +enum class Error { OK, FAILED, ///< Generic fail error ERR_UNAVAILABLE, ///< What is requested is unsupported/unavailable |