Properly call namespaced std::isnan and use implicit conversion operators, such that they work in C++98 and C++14. See also: https://bugs.gentoo.org/show_bug.cgi?id=582866 https://sourceforge.net/p/projectm/code/ci/92226e25192a69839b9ae3b66ea7173732c639b3 --- libprojectM/Common.hpp +++ libprojectM/Common.hpp @@ -63,7 +63,7 @@ #ifdef LINUX #include -#define projectM_isnan isnan +#define projectM_isnan std::isnan #endif --- libprojectM/MilkdropPresetFactory/Parser.cpp +++ libprojectM/MilkdropPresetFactory/Parser.cpp @@ -1406,7 +1406,7 @@ PerFrameEqn * per_frame_eqn; GenExpr * gen_expr; - if (fs == NULL) + if (fs.fail()) return NULL; if (param_string == NULL) return NULL; @@ -1561,7 +1561,7 @@ if (preset == NULL) return NULL; - if (fs == NULL) + if (fs.fail()) return NULL; if ((token = parseToken(fs, name)) != tEq) @@ -1875,7 +1875,7 @@ /* Null argument checks */ if (preset == NULL) return PROJECTM_FAILURE; - if (fs == NULL) + if (fs.fail()) return PROJECTM_FAILURE; if (token == NULL) return PROJECTM_FAILURE; @@ -2166,7 +2166,7 @@ if (token == NULL) return PROJECTM_FAILURE; - if (fs == NULL) + if (fs.fail()) return PROJECTM_FAILURE; if (preset == NULL) return PROJECTM_FAILURE; @@ -2348,7 +2348,7 @@ if (token == NULL) return PROJECTM_FAILURE; - if (fs == NULL) + if (fs.fail()) return PROJECTM_FAILURE; if (preset == NULL) return PROJECTM_FAILURE;