From Wojciech Lewandowski, Windows build fixes, "These are the tweaks I had to make. JSON_Objects / json_stream headers attached. I am not sure how these will behave on VS 2010. Someone with VS 2010 should test it. Should be okay on VS 2008 and below + VS 2012 and above, though."
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14816 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -19,7 +19,22 @@
|
||||
#include "json_stream"
|
||||
|
||||
#ifdef WIN32
|
||||
#include <cstdint>
|
||||
|
||||
#if !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
|
||||
|
||||
typedef unsigned __int8 uint8_t;
|
||||
typedef unsigned __int16 uint16_t;
|
||||
typedef unsigned __int32 uint32_t;
|
||||
typedef signed __int8 int8_t;
|
||||
typedef signed __int16 int16_t;
|
||||
typedef signed __int32 int32_t;
|
||||
|
||||
#else
|
||||
|
||||
#include <cstdint>
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
class WriteVisitor;
|
||||
|
||||
@@ -36,6 +36,12 @@ using namespace std;
|
||||
// * disallow some control characters
|
||||
// * does not support inf or nan values
|
||||
|
||||
#if defined(WIN32) && !defined(__MINGW32__) && (!defined(_MSC_VER) || _MSC_VER<1600)
|
||||
inline int isfinite( double x ) { return _finite( x ); }
|
||||
inline int isinf( double x ) { return !_finite( x ) && !_isnan( x ); }
|
||||
#endif
|
||||
|
||||
|
||||
class json_stream : public osgDB::ofstream {
|
||||
public:
|
||||
json_stream(const std::string& filename, bool strict=true) :
|
||||
|
||||
Reference in New Issue
Block a user