[Bf-blender-cvs] [74b0713d8ab] master: Fix warning-as-error about int to uint conversion in new BLI CPP code.

Bastien Montagne noreply at git.blender.org
Tue Jun 9 11:16:39 CEST 2020


Commit: 74b0713d8ab033ec66dad06e2c1045c4dca1e6c9
Author: Bastien Montagne
Date:   Tue Jun 9 11:15:15 2020 +0200
Branches: master
https://developer.blender.org/rB74b0713d8ab033ec66dad06e2c1045c4dca1e6c9

Fix warning-as-error about int to uint conversion in new BLI CPP code.

Was breaking build for me here...

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

M	source/blender/blenlib/BLI_hash_tables.hh

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

diff --git a/source/blender/blenlib/BLI_hash_tables.hh b/source/blender/blenlib/BLI_hash_tables.hh
index 93c887dedfa..b565b396a7a 100644
--- a/source/blender/blenlib/BLI_hash_tables.hh
+++ b/source/blender/blenlib/BLI_hash_tables.hh
@@ -59,7 +59,7 @@ inline constexpr uint32_t log2_ceil_u_constexpr(uint32_t x)
 
 inline constexpr uint32_t power_of_2_max_u_constexpr(uint32_t x)
 {
-  return 1 << log2_ceil_u_constexpr(x);
+  return 1u << log2_ceil_u_constexpr(x);
 }
 
 template<typename IntT> inline constexpr IntT ceil_division(IntT x, IntT y)



More information about the Bf-blender-cvs mailing list