diff options
Diffstat (limited to 'src/3rdparty/angle/src/compiler/util.h')
-rw-r--r-- | src/3rdparty/angle/src/compiler/util.h | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/3rdparty/angle/src/compiler/util.h b/src/3rdparty/angle/src/compiler/util.h index 35288b7396..dc69f39060 100644 --- a/src/3rdparty/angle/src/compiler/util.h +++ b/src/3rdparty/angle/src/compiler/util.h @@ -7,15 +7,14 @@ #ifndef COMPILER_UTIL_H #define COMPILER_UTIL_H -#ifdef __cplusplus -extern "C" { -#endif +// atof_clamp is like atof but +// 1. it forces C locale, i.e. forcing '.' as decimal point. +// 2. it clamps the value to -FLT_MAX or FLT_MAX if overflow happens. +// Return false if overflow happens. +extern bool atof_clamp(const char *str, float *value); -// atof_dot is like atof but forcing C locale, i.e. forcing '.' as decimal point. -double atof_dot(const char *str); - -#ifdef __cplusplus -} // end extern "C" -#endif +// If overflow happens, clamp the value to INT_MIN or INT_MAX. +// Return false if overflow happens. +extern bool atoi_clamp(const char *str, int *value); #endif // COMPILER_UTIL_H |