[Bf-blender-cvs] [8ea624aeaf1] temp_bmesh_multires: fix gcc build errors

Joseph Eagar noreply at git.blender.org
Fri Apr 2 00:59:06 CEST 2021


Commit: 8ea624aeaf129bcef9ed2636e1d9032d8930f9d2
Author: Joseph Eagar
Date:   Thu Apr 1 15:58:56 2021 -0700
Branches: temp_bmesh_multires
https://developer.blender.org/rB8ea624aeaf129bcef9ed2636e1d9032d8930f9d2

fix gcc build errors

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

M	source/blender/blenkernel/intern/closest_point_tri_sse.cc
M	source/blender/blenlib/intern/BLI_ghash_utils.c

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

diff --git a/source/blender/blenkernel/intern/closest_point_tri_sse.cc b/source/blender/blenkernel/intern/closest_point_tri_sse.cc
index b42cc370f6e..643c04d98f8 100644
--- a/source/blender/blenkernel/intern/closest_point_tri_sse.cc
+++ b/source/blender/blenkernel/intern/closest_point_tri_sse.cc
@@ -78,6 +78,8 @@ __m128 my_mm_blendv_ps(__m128 a, __m128 b, __m128 mask)
       ret.v[i] = fa.v[i];
     }
   }
+
+  return ret.m128;
 }
 #  define _mm_blendv_ps my_mm_blendv_ps
 #endif
diff --git a/source/blender/blenlib/intern/BLI_ghash_utils.c b/source/blender/blenlib/intern/BLI_ghash_utils.c
index a256b57f73e..adbbbe49f4d 100644
--- a/source/blender/blenlib/intern/BLI_ghash_utils.c
+++ b/source/blender/blenlib/intern/BLI_ghash_utils.c
@@ -288,7 +288,6 @@ GSet *BLI_gset_int_new(const char *info)
   return BLI_gset_int_new_ex(info, 0);
 }
 
-
 TableGSet *BLI_table_gset_new(const char *info)
 {
   TableGSet *ts = MEM_callocN(sizeof(TableGSet), info);
@@ -302,9 +301,9 @@ TableGSet *BLI_table_gset_new_ex(const char *info, int size)
 {
   TableGSet *ts = MEM_callocN(sizeof(TableGSet), info);
 
-  ts->ptr_to_idx = BLI_ghash_ptr_new_ex(info, size);
+  ts->ptr_to_idx = BLI_ghash_ptr_new_ex(info, (uint)size);
   if (size) {
-    ts->elems = MEM_callocN(sizeof(void*)*size, info);
+    ts->elems = MEM_callocN(sizeof(void *) * (uint)size, info);
     ts->size = size;
     ts->length = 0;
     ts->cur = 0;
@@ -342,7 +341,7 @@ bool BLI_table_gset_add(TableGSet *ts, void *elem)
 void BLI_table_gset_insert(TableGSet *ts, void *elem)
 {
   if (ts->cur >= ts->size) {
-    int newsize = (ts->cur + 1);
+    uint newsize = (uint)(ts->cur + 1);
     newsize = (newsize << 1) - (newsize >> 1);
     newsize = MAX2(newsize, 8);
 
@@ -366,7 +365,7 @@ void BLI_table_gset_insert(TableGSet *ts, void *elem)
       }
     }
 
-    ts->size = newsize;
+    ts->size = (int)newsize;
     ts->cur = j;
   }
 
@@ -381,7 +380,7 @@ void BLI_table_gset_remove(TableGSet *ts, void *elem, GHashKeyFreeFP freefp)
     return;
   }
 
-  int *idx = (int*)BLI_ghash_lookup_p(ts->ptr_to_idx, elem);
+  int *idx = (int *)BLI_ghash_lookup_p(ts->ptr_to_idx, elem);
   if (!idx) {
     return;
   }



More information about the Bf-blender-cvs mailing list