Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-01-07 03:38:08 +0300
committerCampbell Barton <campbell@blender.org>2022-01-07 06:16:26 +0300
commit3d3bc748849834ef74563deb603ab43859cffeeb (patch)
treede74ce4722b2cb032c22dbc090a15dd2e172c29b /source/blender/blenlib/BLI_math_base.h
parentbb69c19f08ac681d4386325e4318ebfbef2e9531 (diff)
Cleanup: remove redundant const qualifiers for POD types
MSVC used to warn about const mismatch for arguments passed by value. Remove these as newer versions of MSVC no longer show this warning.
Diffstat (limited to 'source/blender/blenlib/BLI_math_base.h')
-rw-r--r--source/blender/blenlib/BLI_math_base.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h
index 6c82bd89e64..f6462233106 100644
--- a/source/blender/blenlib/BLI_math_base.h
+++ b/source/blender/blenlib/BLI_math_base.h
@@ -183,7 +183,7 @@ MINLINE size_t clamp_z(size_t value, size_t min, size_t max);
*
* \param max_diff: the maximum absolute difference.
*/
-MINLINE int compare_ff(float a, float b, const float max_diff);
+MINLINE int compare_ff(float a, float b, float max_diff);
/**
* Almost-equal for IEEE floats, using their integer representation
* (mixing ULP and absolute difference methods).
@@ -195,10 +195,8 @@ MINLINE int compare_ff(float a, float b, const float max_diff);
*
* \see https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
*/
-MINLINE int compare_ff_relative(float a, float b, const float max_diff, const int max_ulps);
-MINLINE bool compare_threshold_relative(const float value1,
- const float value2,
- const float thresh);
+MINLINE int compare_ff_relative(float a, float b, float max_diff, int max_ulps);
+MINLINE bool compare_threshold_relative(float value1, float value2, float thresh);
MINLINE float signf(float f);
MINLINE int signum_i_ex(float a, float eps);
@@ -213,13 +211,13 @@ MINLINE float power_of_2(float f);
* Returns number of (base ten) *significant* digits of integer part of given float
* (negative in case of decimal-only floats, 0.01 returns -1 e.g.).
*/
-MINLINE int integer_digits_f(const float f);
+MINLINE int integer_digits_f(float f);
/**
* Returns number of (base ten) *significant* digits of integer part of given double
* (negative in case of decimal-only floats, 0.01 returns -1 e.g.).
*/
-MINLINE int integer_digits_d(const double d);
-MINLINE int integer_digits_i(const int i);
+MINLINE int integer_digits_d(double d);
+MINLINE int integer_digits_i(int i);
/* These don't really fit anywhere but were being copied about a lot. */