Centralized the calling of #include <stdint.h> and VS fallback into include/osg/Types header

git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@14376 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
Robert Osfield
2014-07-21 16:36:47 +00:00
parent d3945d5210
commit 3b23b474dc
5 changed files with 36 additions and 37 deletions

View File

@@ -12,19 +12,7 @@
*/
#include <osgDB/ReaderWriter>
#ifdef _MSC_VER
typedef __int8 int8_t;
typedef unsigned __int8 uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#include <osg/Types>
struct KTXTexHeader
{

View File

@@ -2,15 +2,9 @@
#define OSG2_BINARYSTREAMOPERATOR
#include <osgDB/StreamOperator>
#include <osg/Types>
#include <vector>
#if defined(_MSC_VER)
typedef unsigned __int32 uint32_t;
typedef __int32 int32_t;
#else
#include <stdint.h>
#endif
class BinaryOutputIterator : public osgDB::OutputIterator
{
@@ -107,7 +101,7 @@ public:
virtual void writeWrappedString( const std::string& str )
{ writeString( str ); }
protected:
std::vector<std::streampos> _beginPositions;
};
@@ -258,7 +252,7 @@ public:
virtual void readWrappedString( std::string& str )
{ readString( str ); }
virtual void advanceToCurrentEndBracket()
{
if ( _supportBinaryBrackets && _beginPositions.size()>0 )

View File

@@ -19,20 +19,7 @@
#include <stdlib.h>
#include <string.h>
#if defined(_MSC_VER)
typedef UINT64 uint64_t;
typedef INT64 int64_t;
typedef UINT32 uint32_t;
typedef INT32 int32_t;
typedef UINT16 uint16_t;
typedef UINT8 uint8_t;
#else
#if defined __sun || defined __hpux
#include <inttypes.h>
#else
#include <stdint.h>
#endif
#endif
#include <osg/Types>
using namespace osg;