Cleanup: remove duplicate math functions

Pull Request: https://projects.blender.org/blender/blender/pulls/136383
This commit is contained in:
Jacques Lucke
2025-03-23 13:28:20 +01:00
parent f76d3c8eb6
commit 0c9f0709d3
2 changed files with 2 additions and 19 deletions

View File

@@ -23,6 +23,7 @@
#include "BLI_utildefines.h"
#include "BLI_asan.h"
#include "BLI_math_base.h"
#include "BLI_mempool.h" /* own include */
#include "BLI_mempool_private.h" /* own include */
@@ -160,19 +161,6 @@ static void mempool_asan_lock(BLI_mempool *pool)
#endif
}
#ifdef USE_CHUNK_POW2
static uint power_of_2_max_u(uint x)
{
x -= 1;
x = x | (x >> 1);
x = x | (x >> 2);
x = x | (x >> 4);
x = x | (x >> 8);
x = x | (x >> 16);
return x + 1;
}
#endif
BLI_INLINE BLI_mempool_chunk *mempool_chunk_find(BLI_mempool_chunk *head, uint index)
{
while (index-- && head) {

View File

@@ -13,6 +13,7 @@
#include "BLI_boxpack_2d.h" /* own include */
#include "BLI_listbase.h"
#include "BLI_math_base.h"
#include "BLI_utildefines.h"
#include "BLI_sort.h" /* qsort_r */
@@ -166,12 +167,6 @@ static bool box_isect(const BoxPack *box_a, const BoxPack *box_b)
/** \} */
/* compiler should inline */
static float max_ff(const float a, const float b)
{
return b > a ? b : a;
}
#ifdef USE_PACK_BIAS
/* set when used is enabled */
static void vert_bias_update(BoxVert *v)