summaryrefslogtreecommitdiffstats
path: root/core/pool_allocator.cpp
diff options
context:
space:
mode:
authorqarmin <mikrutrafal54@gmail.com>2019-06-26 15:08:25 +0200
committerqarmin <mikrutrafal54@gmail.com>2019-06-26 15:08:25 +0200
commit4e5310cc60dc17e5ef09e57115ca8236544679e4 (patch)
tree894c5070a709198ed994db7c7d0c0e124abbc9e5 /core/pool_allocator.cpp
parent5c66771e3ebccdfec55bb94ea521d2f24cb6200a (diff)
downloadredot-engine-4e5310cc60dc17e5ef09e57115ca8236544679e4.tar.gz
Some code changed with Clang-Tidy
Diffstat (limited to 'core/pool_allocator.cpp')
-rw-r--r--core/pool_allocator.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp
index 11a3be89bd..094352b5cc 100644
--- a/core/pool_allocator.cpp
+++ b/core/pool_allocator.cpp
@@ -206,8 +206,8 @@ PoolAllocator::ID PoolAllocator::alloc(int p_size) {
if (!find_hole(&new_entry_indices_pos, size_to_alloc)) {
mt_unlock();
- ERR_PRINT("memory can't be compacted further");
- return POOL_ALLOCATOR_INVALID_ID;
+ ERR_EXPLAIN("Memory can't be compacted further");
+ ERR_FAIL_V(POOL_ALLOCATOR_INVALID_ID);
}
}
@@ -217,7 +217,8 @@ PoolAllocator::ID PoolAllocator::alloc(int p_size) {
if (!found_free_entry) {
mt_unlock();
- ERR_FAIL_COND_V(!found_free_entry, POOL_ALLOCATOR_INVALID_ID);
+ ERR_EXPLAIN("No free entry found in PoolAllocator");
+ ERR_FAIL_V(POOL_ALLOCATOR_INVALID_ID);
}
/* move all entry indices up, make room for this one */