Added using namespace std and removed the std:: prefixes before the std::isfinte and std::isinf function calls to avoid problems with Android builds against older NDK's.
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14780 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -10,6 +10,7 @@
|
||||
#include <cmath>
|
||||
#include <limits>
|
||||
|
||||
using namespace std;
|
||||
|
||||
// A simple class wrapping ofstream calls to enable generic cleaning of json data.
|
||||
// Especially 'standard' json should:
|
||||
@@ -66,11 +67,11 @@ class json_stream : public std::ofstream {
|
||||
}
|
||||
|
||||
double to_valid_float(const double d) {
|
||||
if(std::isfinite(d)) {
|
||||
if(isfinite(d)) {
|
||||
return d;
|
||||
}
|
||||
else {
|
||||
if(std::isinf(d)) {
|
||||
if(isinf(d)) {
|
||||
return std::numeric_limits<double>::max();
|
||||
}
|
||||
// no much way to do better than replace invalid float NaN by 0
|
||||
|
||||
Reference in New Issue
Block a user