diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/class_db.cpp | 4 | ||||
-rw-r--r-- | src/core/memory.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/core/class_db.cpp b/src/core/class_db.cpp index 159c031..76abd21 100644 --- a/src/core/class_db.cpp +++ b/src/core/class_db.cpp @@ -77,7 +77,7 @@ void ClassDB::add_property(const StringName &p_class, const PropertyInfo &p_pinf if (p_setter != String("")) { setter = get_method(p_class, p_setter); - ERR_FAIL_COND_MSG(!setter, String("Setter method '{0}::{1}()' not found for property '{2}::{3}'.").format(Array::make(p_class, p_setter, p_class, p_pinfo.name))); + ERR_FAIL_NULL_MSG(setter, String("Setter method '{0}::{1}()' not found for property '{2}::{3}'.").format(Array::make(p_class, p_setter, p_class, p_pinfo.name))); size_t exp_args = 1 + (p_index >= 0 ? 1 : 0); ERR_FAIL_COND_MSG((int)exp_args != setter->get_argument_count(), String("Setter method '{0}::{1}()' must take a single argument.").format(Array::make(p_class, p_setter))); @@ -86,7 +86,7 @@ void ClassDB::add_property(const StringName &p_class, const PropertyInfo &p_pinf ERR_FAIL_COND_MSG(p_getter == String(""), String("Getter method must be specified for '{0}::{1}'.").format(Array::make(p_class, p_pinfo.name))); MethodBind *getter = get_method(p_class, p_getter); - ERR_FAIL_COND_MSG(!getter, String("Getter method '{0}::{1}()' not found for property '{2}::{3}'.").format(Array::make(p_class, p_getter, p_class, p_pinfo.name))); + ERR_FAIL_NULL_MSG(getter, String("Getter method '{0}::{1}()' not found for property '{2}::{3}'.").format(Array::make(p_class, p_getter, p_class, p_pinfo.name))); { size_t exp_args = 0 + (p_index >= 0 ? 1 : 0); ERR_FAIL_COND_MSG((int)exp_args != getter->get_argument_count(), String("Getter method '{0}::{1}()' must not take any argument.").format(Array::make(p_class, p_getter))); diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 17b0696..80e71ec 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -42,7 +42,7 @@ void *Memory::alloc_static(size_t p_bytes, bool p_pad_align) { #endif void *mem = internal::gdextension_interface_mem_alloc(p_bytes + (prepad ? PAD_ALIGN : 0)); - ERR_FAIL_COND_V(!mem, nullptr); + ERR_FAIL_NULL_V(mem, nullptr); if (prepad) { uint8_t *s8 = (uint8_t *)mem; @@ -71,7 +71,7 @@ void *Memory::realloc_static(void *p_memory, size_t p_bytes, bool p_pad_align) { if (prepad) { mem -= PAD_ALIGN; mem = (uint8_t *)internal::gdextension_interface_mem_realloc(mem, p_bytes + PAD_ALIGN); - ERR_FAIL_COND_V(!mem, nullptr); + ERR_FAIL_NULL_V(mem, nullptr); return mem + PAD_ALIGN; } else { return (uint8_t *)internal::gdextension_interface_mem_realloc(mem, p_bytes); |