[Bf-blender-cvs] [8eb7a041502] temp_bmesh_multires: fix signed/unsigned warning
Joseph Eagar
noreply at git.blender.org
Sun Aug 22 05:46:20 CEST 2021
Commit: 8eb7a04150262b5c7bf407bc849baf506ff9c0c8
Author: Joseph Eagar
Date: Sat Aug 21 20:46:08 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rB8eb7a04150262b5c7bf407bc849baf506ff9c0c8
fix signed/unsigned warning
===================================================================
M source/blender/blenkernel/intern/pbvh_bmesh.c
===================================================================
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 13d322dbec7..f3874c8af4f 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -3999,21 +3999,21 @@ void pbvh_bmesh_cache_test(CacheParams *params, BMesh **r_bm, PBVH **r_pbvh_out)
}
// randomize
- int *rands[4];
- int tots[4] = {bm->totvert, bm->totedge, bm->totloop, bm->totface};
+ uint *rands[4];
+ uint tots[4] = {bm->totvert, bm->totedge, bm->totloop, bm->totface};
RNG *rng = BLI_rng_new(0);
- for (int i = 0; i < 4; i++) {
- rands[i] = MEM_malloc_arrayN(tots[i], sizeof(int), "rands[i]");
+ for (uint i = 0; i < 4; i++) {
+ rands[i] = MEM_malloc_arrayN(tots[i], sizeof(uint), "rands[i]");
- for (int j = 0; j < tots[i]; j++) {
+ for (uint j = 0; j < tots[i]; j++) {
rands[i][j] = j;
}
- for (int j = 0; j < tots[i] >> 1; j++) {
+ for (uint j = 0; j < tots[i] >> 1; j++) {
int j2 = BLI_rng_get_int(rng) % tots[i];
- SWAP(int, rands[i][j], rands[i][j2]);
+ SWAP(uint, rands[i][j], rands[i][j2]);
}
}
More information about the Bf-blender-cvs
mailing list