diff options
Diffstat (limited to 'core/class_db.h')
-rw-r--r-- | core/class_db.h | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/core/class_db.h b/core/class_db.h index 02eac0dbbc..05c4b6d932 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -45,12 +45,11 @@ struct ParamHint { String hint_text; Variant default_val; - ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", Variant p_default_val = Variant()) { - - name = p_name; - hint = p_hint; - hint_text = p_hint_text; - default_val = p_default_val; + ParamHint(const String &p_name = "", PropertyHint p_hint = PROPERTY_HINT_NONE, const String &p_hint_text = "", Variant p_default_val = Variant()) + : name(p_name), + hint(p_hint), + hint_text(p_hint_text), + default_val(p_default_val) { } }; @@ -73,8 +72,10 @@ struct MethodDefinition { StringName name; Vector<StringName> args; MethodDefinition() {} - MethodDefinition(const char *p_name) { name = p_name; } - MethodDefinition(const StringName &p_name) { name = p_name; } + MethodDefinition(const char *p_name) + : name(p_name) {} + MethodDefinition(const StringName &p_name) + : name(p_name) {} }; MethodDefinition D_METHOD(const char *p_name); |