diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-16 01:48:02 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-05-17 22:39:16 +0300 |
commit | 21fddf7d1c0653881773e44cea6e9d0804a08b31 (patch) | |
tree | cf3179fce0393c9cc2577d546db790d5f7705694 /source/blender/python | |
parent | 2b73402547a7c765f302a0d4218f96b5a710e96f (diff) |
C99/C++11: replace deprecated finite() by isfinite().
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/generic/py_capi_utils.c | 4 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_driver.c | 2 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_util.c | 2 | ||||
-rw-r--r-- | source/blender/python/mathutils/mathutils_Quaternion.c | 8 |
4 files changed, 8 insertions, 8 deletions
diff --git a/source/blender/python/generic/py_capi_utils.c b/source/blender/python/generic/py_capi_utils.c index dd32c913f78..7f13a7a4d94 100644 --- a/source/blender/python/generic/py_capi_utils.c +++ b/source/blender/python/generic/py_capi_utils.c @@ -45,7 +45,7 @@ #ifdef _WIN32 #include "BLI_path_util.h" /* BLI_setenv() */ -#include "BLI_math_base.h" /* finite() */ +#include "BLI_math_base.h" /* isfinite() */ #endif /* array utility function */ @@ -1026,7 +1026,7 @@ bool PyC_RunString_AsNumber(const char *expr, double *value, const char *filenam if (val == -1 && PyErr_Occurred()) { ok = false; } - else if (!finite(val)) { + else if (!isfinite(val)) { *value = 0.0; } else { diff --git a/source/blender/python/intern/bpy_driver.c b/source/blender/python/intern/bpy_driver.c index 9cd6fe3da91..9b477e384db 100644 --- a/source/blender/python/intern/bpy_driver.c +++ b/source/blender/python/intern/bpy_driver.c @@ -347,7 +347,7 @@ float BPY_driver_exec(ChannelDriver *driver, const float evaltime) if (use_gil) PyGILState_Release(gilstate); - if (finite(result)) { + if (isfinite(result)) { return (float)result; } else { diff --git a/source/blender/python/intern/bpy_util.c b/source/blender/python/intern/bpy_util.c index ee827c06e14..2b8ad6ccb90 100644 --- a/source/blender/python/intern/bpy_util.c +++ b/source/blender/python/intern/bpy_util.c @@ -148,4 +148,4 @@ bool BPy_errors_to_report_ex(ReportList *reports, const bool use_full, const boo bool BPy_errors_to_report(ReportList *reports) { return BPy_errors_to_report_ex(reports, true, true); -}
\ No newline at end of file +} diff --git a/source/blender/python/mathutils/mathutils_Quaternion.c b/source/blender/python/mathutils/mathutils_Quaternion.c index ea5732966b2..71b3cf8ddac 100644 --- a/source/blender/python/mathutils/mathutils_Quaternion.c +++ b/source/blender/python/mathutils/mathutils_Quaternion.c @@ -1165,9 +1165,9 @@ static void quat__axis_angle_sanitize(float axis[3], float *angle) { if (axis) { if (is_zero_v3(axis) || - !finite(axis[0]) || - !finite(axis[1]) || - !finite(axis[2])) + !isfinite(axis[0]) || + !isfinite(axis[1]) || + !isfinite(axis[2])) { axis[0] = 1.0f; axis[1] = 0.0f; @@ -1182,7 +1182,7 @@ static void quat__axis_angle_sanitize(float axis[3], float *angle) } if (angle) { - if (!finite(*angle)) { + if (!isfinite(*angle)) { *angle = 0.0f; } } |