diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-09-28 15:42:55 +0200 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2023-10-08 16:22:24 +0200 |
commit | 034c0f1624dbdc8fd2460cda148ac90f5fd53198 (patch) | |
tree | ca13af3a8366291d2a8a08695165fcd7b7889a42 /core/templates | |
parent | 6916349697a4339216469e9bf5899b983d78db07 (diff) | |
download | redot-engine-034c0f1624dbdc8fd2460cda148ac90f5fd53198.tar.gz |
Replace `sanity` with `safety` for checks
Diffstat (limited to 'core/templates')
-rw-r--r-- | core/templates/paged_allocator.h | 2 | ||||
-rw-r--r-- | core/templates/safe_refcount.h | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/core/templates/paged_allocator.h b/core/templates/paged_allocator.h index deb2937771..72425a8c3d 100644 --- a/core/templates/paged_allocator.h +++ b/core/templates/paged_allocator.h @@ -144,7 +144,7 @@ public: if (thread_safe) { spin_lock.lock(); } - ERR_FAIL_COND(page_pool != nullptr); //sanity check + ERR_FAIL_COND(page_pool != nullptr); // Safety check. ERR_FAIL_COND(p_page_size == 0); page_size = nearest_power_of_2_templated(p_page_size); page_mask = page_size - 1; diff --git a/core/templates/safe_refcount.h b/core/templates/safe_refcount.h index bfc9f6fc9a..20fb0c6501 100644 --- a/core/templates/safe_refcount.h +++ b/core/templates/safe_refcount.h @@ -182,7 +182,7 @@ class SafeRefCount { SafeNumeric<uint32_t> count; #ifdef DEV_ENABLED - _ALWAYS_INLINE_ void _check_unref_sanity() { + _ALWAYS_INLINE_ void _check_unref_safety() { // This won't catch every misuse, but it's better than nothing. CRASH_COND_MSG(count.get() == 0, "Trying to unreference a SafeRefCount which is already zero is wrong and a symptom of it being misused.\n" @@ -202,14 +202,14 @@ public: _ALWAYS_INLINE_ bool unref() { // true if must be disposed of #ifdef DEV_ENABLED - _check_unref_sanity(); + _check_unref_safety(); #endif return count.decrement() == 0; } _ALWAYS_INLINE_ uint32_t unrefval() { // 0 if must be disposed of #ifdef DEV_ENABLED - _check_unref_sanity(); + _check_unref_safety(); #endif return count.decrement(); } |