summaryrefslogtreecommitdiff
path: root/core/pool_allocator.cpp
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-01 21:52:55 +0200
committerGitHub <noreply@github.com>2017-09-01 21:52:55 +0200
commitdac150108ab3c1f41d5fd86cc6853f883064caaf (patch)
tree09195c9dd5e0d651e96b7d26f26985ab5ff6f871 /core/pool_allocator.cpp
parent69ac4cbb3764a454194e27a7afe71d98af65c32c (diff)
parentf9467ec1ea6c0dac2ea513b7dfe58d0349788e02 (diff)
Merge pull request #10846 from hpvb/fix-sign-compare
Fix signed and unsigned comparisons
Diffstat (limited to 'core/pool_allocator.cpp')
-rw-r--r--core/pool_allocator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/core/pool_allocator.cpp b/core/pool_allocator.cpp
index c122d21545..c5f6d0dde0 100644
--- a/core/pool_allocator.cpp
+++ b/core/pool_allocator.cpp
@@ -339,9 +339,9 @@ Error PoolAllocator::resize(ID p_mem, int p_new_size) {
ERR_FAIL_COND_V(e->lock, ERR_ALREADY_IN_USE);
}
- int alloc_size = aligned(p_new_size);
+ uint32_t alloc_size = aligned(p_new_size);
- if (aligned(e->len) == alloc_size) {
+ if ((uint32_t)aligned(e->len) == alloc_size) {
e->len = p_new_size;
mt_unlock();
@@ -374,7 +374,7 @@ Error PoolAllocator::resize(ID p_mem, int p_new_size) {
}
//no need to move stuff around, it fits before the next block
- int next_pos;
+ uint32_t next_pos;
if (entry_indices_pos + 1 == entry_count) {
next_pos = pool_size; // - static_area_size;
} else {