diff options
author | Hein-Pieter van Braam <hp@tmm.cx> | 2017-08-31 23:30:35 +0200 |
---|---|---|
committer | Hein-Pieter van Braam <hp@tmm.cx> | 2017-09-01 08:13:12 +0200 |
commit | f9467ec1ea6c0dac2ea513b7dfe58d0349788e02 (patch) | |
tree | 05421200fdd55c97b3b60895597f487d8ac51afa /core/pool_allocator.cpp | |
parent | 51ae90d7893fd392dd8938cc41c52081e5065794 (diff) | |
download | redot-engine-f9467ec1ea6c0dac2ea513b7dfe58d0349788e02.tar.gz |
Fix signed and unsigned comparisons
The first in my quest to make Godot 3.x compile with -Werror on GCC7
Diffstat (limited to 'core/pool_allocator.cpp')
-rw-r--r-- | core/pool_allocator.cpp | 6 |
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 { |