diff options
| author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-12 15:33:49 +0200 |
|---|---|---|
| committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-13 14:34:04 +0200 |
| commit | 1e5767693e45f58e2ffdc45d4c4f26057e25a2d6 (patch) | |
| tree | b65c1480f53655ef849d65b1051c89d4e0b769c0 /include/godot_cpp/core | |
| parent | 6caf4909d42c04de25d9c34e89da7aa078fb485f (diff) | |
| download | redot-cpp-1e5767693e45f58e2ffdc45d4c4f26057e25a2d6.tar.gz | |
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
Diffstat (limited to 'include/godot_cpp/core')
| -rw-r--r-- | include/godot_cpp/core/class_db.hpp | 2 | ||||
| -rw-r--r-- | include/godot_cpp/core/memory.hpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 1a17b57..3f2b946 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -253,7 +253,7 @@ MethodBind *ClassDB::bind_static_method(StringName p_class, N p_method_name, M p template <class M> MethodBind *ClassDB::bind_vararg_method(uint32_t p_flags, StringName p_name, M p_method, const MethodInfo &p_info, const std::vector<Variant> &p_default_args, bool p_return_nil_is_variant) { MethodBind *bind = create_vararg_method_bind(p_method, p_info, p_return_nil_is_variant); - ERR_FAIL_COND_V(!bind, nullptr); + ERR_FAIL_NULL_V(bind, nullptr); bind->set_name(p_name); bind->set_default_arguments(p_default_args); diff --git a/include/godot_cpp/core/memory.hpp b/include/godot_cpp/core/memory.hpp index dd4a155..548f330 100644 --- a/include/godot_cpp/core/memory.hpp +++ b/include/godot_cpp/core/memory.hpp @@ -146,7 +146,7 @@ T *memnew_arr_template(size_t p_elements, const char *p_descr = "") { size_t len = sizeof(T) * p_elements; uint64_t *mem = (uint64_t *)Memory::alloc_static(len, true); T *failptr = nullptr; // Get rid of a warning. - ERR_FAIL_COND_V(!mem, failptr); + ERR_FAIL_NULL_V(mem, failptr); *(mem - 1) = p_elements; if (!std::is_trivially_destructible<T>::value) { |
