diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2020-05-14 12:53:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-14 12:53:38 +0200 |
commit | 5f5f53e8eba5c9b708714de58d3cca6ceb010279 (patch) | |
tree | 8bebdce946466ce8e9476ccd46c9dba62c323938 /modules/gdscript/gdscript_function.h | |
parent | e7c9d818766a119089873e4941e4865fb36883ec (diff) | |
parent | 1f6f364a56319eabd02c050746fe7df3f55ffee3 (diff) | |
download | redot-engine-5f5f53e8eba5c9b708714de58d3cca6ceb010279.tar.gz |
Merge pull request #38697 from akien-mga/member-init-c++11
Port member default initialization from constructor to declaration (C++11)
Diffstat (limited to 'modules/gdscript/gdscript_function.h')
-rw-r--r-- | modules/gdscript/gdscript_function.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/modules/gdscript/gdscript_function.h b/modules/gdscript/gdscript_function.h index 89dbeacf34..7043c9b69b 100644 --- a/modules/gdscript/gdscript_function.h +++ b/modules/gdscript/gdscript_function.h @@ -43,15 +43,18 @@ class GDScriptInstance; class GDScript; struct GDScriptDataType { - bool has_type; - enum { + enum Kind { UNINITIALIZED, BUILTIN, NATIVE, SCRIPT, GDSCRIPT, - } kind; - Variant::Type builtin_type; + }; + + Kind kind = UNINITIALIZED; + + bool has_type = false; + Variant::Type builtin_type = Variant::NIL; StringName native_type; Ref<Script> script_type; @@ -147,10 +150,7 @@ struct GDScriptDataType { return info; } - GDScriptDataType() : - has_type(false), - kind(UNINITIALIZED), - builtin_type(Variant::NIL) {} + GDScriptDataType() {} }; class GDScriptFunction { |