Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2020-07-21 10:03:37 +0300
committerJacques Lucke <jacques@blender.org>2020-07-21 10:03:37 +0300
commitfdc3f56234e1bde5ed1d3108501c4d1812da1d7f (patch)
tree1afb1ffbe24b9abda07e94c3c6f0d6a42601df20 /source/blender/blenlib
parentc46663ad66c6e378214f34db483ac67bb4c27272 (diff)
Cleanup: convert unsigned to signed comparison in assert
Thanks to Campbell for pointing this out.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/BLI_allocator.hh4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenlib/BLI_allocator.hh b/source/blender/blenlib/BLI_allocator.hh
index d49b98cb33b..47d8156476f 100644
--- a/source/blender/blenlib/BLI_allocator.hh
+++ b/source/blender/blenlib/BLI_allocator.hh
@@ -84,8 +84,8 @@ class RawAllocator {
void *ptr = malloc(size + alignment + sizeof(MemHead));
void *used_ptr = (void *)((uintptr_t)POINTER_OFFSET(ptr, alignment + sizeof(MemHead)) &
~((uintptr_t)alignment - 1));
- int offset = (int)((uintptr_t)used_ptr - (uintptr_t)ptr);
- BLI_assert((size_t)offset >= sizeof(MemHead));
+ int offset = (int)((intptr_t)used_ptr - (intptr_t)ptr);
+ BLI_assert(offset >= (int)sizeof(MemHead));
((MemHead *)used_ptr - 1)->offset = (int)offset;
return used_ptr;
}