[Bf-blender-cvs] [4ca249018d0] temp_bmesh_multires: More msvc errors

Joseph Eagar noreply at git.blender.org
Mon Jul 12 22:03:48 CEST 2021


Commit: 4ca249018d0775f838bba1ff2d34bf87bff5df81
Author: Joseph Eagar
Date:   Mon Jul 12 16:03:22 2021 -0400
Branches: temp_bmesh_multires
https://developer.blender.org/rB4ca249018d0775f838bba1ff2d34bf87bff5df81

More msvc errors

===================================================================

M	source/blender/blenlib/intern/BLI_mempool.c

===================================================================

diff --git a/source/blender/blenlib/intern/BLI_mempool.c b/source/blender/blenlib/intern/BLI_mempool.c
index 2df4e44b253..f751ff373c9 100644
--- a/source/blender/blenlib/intern/BLI_mempool.c
+++ b/source/blender/blenlib/intern/BLI_mempool.c
@@ -288,17 +288,17 @@ BLI_mempool *BLI_mempool_create_for_tasks(const unsigned int esize,
                                           int *r_esize,
                                           int flag)
 {
-  BLI_mempool *pool = BLI_mempool_create(esize, 0, pchunk, flag);
+  BLI_mempool *pool = BLI_mempool_create(esize, 0, (uint)pchunk, (uint)flag);
 
   // override pchunk, may not be a power of 2
-  pool->pchunk = pchunk;
-  pool->csize = pchunk * pool->esize;
+  pool->pchunk = (uint)pchunk;
+  pool->csize = (uint)pchunk * pool->esize;
 
   if (totelem % pchunk == 0) {
-    pool->maxchunks = totelem / pchunk;
+    pool->maxchunks = (uint)totelem / (uint)pchunk;
   }
   else {
-    pool->maxchunks = totelem / pchunk + 1;
+    pool->maxchunks = (uint)totelem / (uint)pchunk + 1;
   }
 
   if (totelem) {
@@ -330,7 +330,7 @@ BLI_mempool *BLI_mempool_create_for_tasks(const unsigned int esize,
 
   int i = (int)pool->pchunk - 1;
 
-  while (lastchunk && totalloc > totelem) {
+  while (lastchunk && totalloc > (uint)totelem) {
     if (i < 0) {
       BLI_mempool_chunk *lastchunk2 = NULL;
 
@@ -356,7 +356,7 @@ BLI_mempool *BLI_mempool_create_for_tasks(const unsigned int esize,
     i--;
   }
 
-  unsigned int ci = 0;
+  int ci = 0;
 
   chunk = pool->chunks;
   while (chunk && chunk != lastchunk) {
@@ -370,7 +370,7 @@ BLI_mempool *BLI_mempool_create_for_tasks(const unsigned int esize,
 
   *r_totchunk = ci;
   *r_chunks = (void **)chunks;
-  *r_esize = pool->esize;
+  *r_esize = (int)pool->esize;
 
   return pool;
 }



More information about the Bf-blender-cvs mailing list