diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-04-02 14:52:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 14:52:36 +0200 |
commit | 058a0afdeca83145d58a95c426dd01216c397ea9 (patch) | |
tree | be0cd59e5a90926e9d653fed9f3b1b77e735ca2f /core/class_db.h | |
parent | 5f11e1557156617366d2c316a97716172103980d (diff) | |
parent | 95a1400a2ac9de1a29fa305f45b928ce8e3044bd (diff) |
Merge pull request #37338 from lupoDharkael/nullprt
Replace NULL with nullptr
Diffstat (limited to 'core/class_db.h')
-rw-r--r-- | core/class_db.h | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/class_db.h b/core/class_db.h index 35bbe6b6f5..1cbff34ea1 100644 --- a/core/class_db.h +++ b/core/class_db.h @@ -234,7 +234,7 @@ public: MethodBind *bind = create_method_bind(p_method); - return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, NULL, 0); //use static function, much smaller binary usage + return bind_methodfi(METHOD_FLAGS_DEFAULT, bind, p_method_name, nullptr, 0); //use static function, much smaller binary usage } template <class N, class M> @@ -315,7 +315,7 @@ public: GLOBAL_LOCK_FUNCTION; MethodBind *bind = create_vararg_method_bind(p_method, p_info, p_return_nil_is_variant); - ERR_FAIL_COND_V(!bind, NULL); + ERR_FAIL_COND_V(!bind, nullptr); bind->set_name(p_name); bind->set_default_arguments(p_default_args); @@ -325,13 +325,13 @@ public: ClassInfo *type = classes.getptr(instance_type); if (!type) { memdelete(bind); - ERR_FAIL_COND_V(!type, NULL); + ERR_FAIL_COND_V(!type, nullptr); } if (type->method_map.has(p_name)) { memdelete(bind); // overloading not supported - ERR_FAIL_V_MSG(NULL, "Method already bound: " + instance_type + "::" + p_name + "."); + ERR_FAIL_V_MSG(nullptr, "Method already bound: " + instance_type + "::" + p_name + "."); } type->method_map[p_name] = bind; #ifdef DEBUG_METHODS_ENABLED @@ -351,12 +351,12 @@ public: static void add_property_group(StringName p_class, const String &p_name, const String &p_prefix = ""); static void add_property(StringName p_class, const PropertyInfo &p_pinfo, const StringName &p_setter, const StringName &p_getter, int p_index = -1); static void set_property_default_value(StringName p_class, const StringName &p_name, const Variant &p_default); - static void get_property_list(StringName p_class, List<PropertyInfo> *p_list, bool p_no_inheritance = false, const Object *p_validator = NULL); - static bool set_property(Object *p_object, const StringName &p_property, const Variant &p_value, bool *r_valid = NULL); + static void get_property_list(StringName p_class, List<PropertyInfo> *p_list, bool p_no_inheritance = false, const Object *p_validator = nullptr); + static bool set_property(Object *p_object, const StringName &p_property, const Variant &p_value, bool *r_valid = nullptr); static bool get_property(Object *p_object, const StringName &p_property, Variant &r_value); static bool has_property(const StringName &p_class, const StringName &p_property, bool p_no_inheritance = false); - static int get_property_index(const StringName &p_class, const StringName &p_property, bool *r_is_valid = NULL); - static Variant::Type get_property_type(const StringName &p_class, const StringName &p_property, bool *r_is_valid = NULL); + static int get_property_index(const StringName &p_class, const StringName &p_property, bool *r_is_valid = nullptr); + static Variant::Type get_property_type(const StringName &p_class, const StringName &p_property, bool *r_is_valid = nullptr); static StringName get_property_setter(StringName p_class, const StringName &p_property); static StringName get_property_getter(StringName p_class, const StringName &p_property); @@ -371,13 +371,13 @@ public: static void bind_integer_constant(const StringName &p_class, const StringName &p_enum, const StringName &p_name, int p_constant); static void get_integer_constant_list(const StringName &p_class, List<String> *p_constants, bool p_no_inheritance = false); - static int get_integer_constant(const StringName &p_class, const StringName &p_name, bool *p_success = NULL); + static int get_integer_constant(const StringName &p_class, const StringName &p_name, bool *p_success = nullptr); static StringName get_integer_constant_enum(const StringName &p_class, const StringName &p_name, bool p_no_inheritance = false); static void get_enum_list(const StringName &p_class, List<StringName> *p_enums, bool p_no_inheritance = false); static void get_enum_constants(const StringName &p_class, const StringName &p_enum, List<StringName> *p_constants, bool p_no_inheritance = false); - static Variant class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid = NULL); + static Variant class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid = nullptr); static StringName get_category(const StringName &p_node); |