Warning fixes for Clang-3.6
git-svn-id: http://svn.openscenegraph.org/osg/OpenSceneGraph/trunk@15016 16af8721-9629-0410-8352-f15c8da7e697
This commit is contained in:
@@ -136,7 +136,6 @@ public:
|
||||
_listTriangles(listTriangles),
|
||||
_hasNormalCoords(geo->getNormalArray() != NULL),
|
||||
_hasTexCoords(geo->getTexCoordArray(0) != NULL),
|
||||
_geo(geo),
|
||||
_lastFaceIndex(0),
|
||||
_material(material)
|
||||
{
|
||||
@@ -288,7 +287,6 @@ private:
|
||||
GLenum _modeCache;
|
||||
std::vector<GLuint> _indexCache;
|
||||
bool _hasNormalCoords, _hasTexCoords;
|
||||
osg::Geometry* _geo;
|
||||
unsigned int _lastFaceIndex;
|
||||
unsigned int _material;
|
||||
};
|
||||
|
||||
@@ -68,7 +68,7 @@ FltExportVisitor::FltExportVisitor( DataOutputStream* dos,
|
||||
_dos( *dos ),
|
||||
_materialPalette( new MaterialPaletteManager( *fltOpt ) ),
|
||||
_texturePalette( new TexturePaletteManager( *this, *fltOpt ) ),
|
||||
_lightSourcePalette( new LightSourcePaletteManager( *fltOpt ) ),
|
||||
_lightSourcePalette( new LightSourcePaletteManager( ) ),
|
||||
_vertexPalette( new VertexPaletteManager( *fltOpt ) ),
|
||||
_firstNode( true )
|
||||
{
|
||||
|
||||
@@ -28,10 +28,8 @@ namespace flt
|
||||
{
|
||||
|
||||
|
||||
LightSourcePaletteManager::LightSourcePaletteManager( ExportOptions& fltOpt )
|
||||
: _currIndex( -1 ),
|
||||
_fltOpt( fltOpt )
|
||||
|
||||
LightSourcePaletteManager::LightSourcePaletteManager()
|
||||
: _currIndex( -1 )
|
||||
{
|
||||
// TODO: Pay attention to the version here(?)
|
||||
}
|
||||
|
||||
@@ -36,7 +36,7 @@ class DataOutputStream;
|
||||
class LightSourcePaletteManager
|
||||
{
|
||||
public:
|
||||
LightSourcePaletteManager( ExportOptions& fltOpt );
|
||||
LightSourcePaletteManager();
|
||||
|
||||
// Add a light to the palette and auto-assign it the next available index
|
||||
int add(osg::Light const* light);
|
||||
@@ -64,9 +64,6 @@ class LightSourcePaletteManager
|
||||
typedef std::map<osg::Light const*, LightRecord> LightPalette;
|
||||
LightPalette _lightPalette;
|
||||
|
||||
|
||||
ExportOptions& _fltOpt;
|
||||
|
||||
protected:
|
||||
|
||||
LightSourcePaletteManager& operator = (const LightSourcePaletteManager&) { return *this; }
|
||||
|
||||
@@ -952,14 +952,15 @@ protected:
|
||||
if (_parent.valid())
|
||||
{
|
||||
// LODs adds an empty child group so it is safe to remove this object record.
|
||||
if (typeid(*_parent)==typeid(flt::LevelOfDetail))
|
||||
PrimaryRecord* parent = _parent.get();
|
||||
if (typeid(parent)==typeid(flt::LevelOfDetail))
|
||||
return true;
|
||||
|
||||
if (typeid(*_parent)==typeid(flt::OldLevelOfDetail))
|
||||
if (typeid(parent)==typeid(flt::OldLevelOfDetail))
|
||||
return true;
|
||||
|
||||
// If parent is a Group record we have to check for animation.
|
||||
Group* parentGroup = dynamic_cast<flt::Group*>(_parent.get());
|
||||
Group* parentGroup = dynamic_cast<flt::Group*>(parent);
|
||||
if (parentGroup && !parentGroup->hasAnimation())
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -163,10 +163,10 @@ FltExportVisitor::writeHeader( const std::string& headerName )
|
||||
// Group flags
|
||||
static const unsigned int FORWARD_ANIM = 0x80000000u >> 1;
|
||||
static const unsigned int SWING_ANIM = 0x80000000u >> 2;
|
||||
static const unsigned int BOUND_BOX_FOLLOW = 0x80000000u >> 3;
|
||||
static const unsigned int FREEZE_BOUND_BOX = 0x80000000u >> 4;
|
||||
static const unsigned int DEFAULT_PARENT = 0x80000000u >> 5;
|
||||
static const unsigned int BACKWARD_ANIM = 0x80000000u >> 6;
|
||||
//static const unsigned int BOUND_BOX_FOLLOW = 0x80000000u >> 3;
|
||||
//static const unsigned int FREEZE_BOUND_BOX = 0x80000000u >> 4;
|
||||
//static const unsigned int DEFAULT_PARENT = 0x80000000u >> 5;
|
||||
//static const unsigned int BACKWARD_ANIM = 0x80000000u >> 6;
|
||||
|
||||
|
||||
//
|
||||
@@ -402,8 +402,8 @@ FltExportVisitor::writeDegreeOfFreedom( const osgSim::DOFTransform* dof )
|
||||
static const unsigned long COLOR_PALETTE_OVERRIDE = 0x80000000u >> 0;
|
||||
static const unsigned long MATERIAL_PALETTE_OVERRIDE = 0x80000000u >> 1;
|
||||
static const unsigned long TEXTURE_PALETTE_OVERRIDE = 0x80000000u >> 2;
|
||||
static const unsigned long LINE_STYLE_PALETTE_OVERRIDE = 0x80000000u >> 3;
|
||||
static const unsigned long SOUND_PALETTE_OVERRIDE = 0x80000000u >> 4;
|
||||
//static const unsigned long LINE_STYLE_PALETTE_OVERRIDE = 0x80000000u >> 3;
|
||||
//static const unsigned long SOUND_PALETTE_OVERRIDE = 0x80000000u >> 4;
|
||||
static const unsigned long LIGHT_SOURCE_PALETTE_OVERRIDE = 0x80000000u >> 5;
|
||||
static const unsigned long LIGHT_POINT_PALETTE_OVERRIDE = 0x80000000u >> 6;
|
||||
static const unsigned long SHADER_PALETTE_OVERRIDE = 0x80000000u >> 7;
|
||||
|
||||
@@ -114,7 +114,7 @@ FT_Byte* FreeTypeLibrary::getFace(std::istream& fontstream, unsigned int index,
|
||||
std::streampos length = end - start;
|
||||
|
||||
/* empty stream into memory, open that, and keep the pointer in a FreeTypeFont for cleanup */
|
||||
FT_Byte *buffer = new FT_Byte[length];
|
||||
FT_Byte *buffer = new FT_Byte[static_cast<int>(length)];
|
||||
fontstream.read(reinterpret_cast<char*>(buffer), length);
|
||||
if (!fontstream || (static_cast<std::streampos>(fontstream.gcount()) != length))
|
||||
{
|
||||
|
||||
@@ -424,8 +424,6 @@ public:
|
||||
{
|
||||
out << getRequestPath() << "(int keycode): send KEY_DOWN and KEY_UP";
|
||||
}
|
||||
private:
|
||||
bool _handleKeyPress;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -54,18 +54,26 @@
|
||||
#if defined(__GLIBC__) || defined(__ANDROID__) || defined(__CYGWIN__)
|
||||
#include <endian.h>
|
||||
#if (__BYTE_ORDER == __LITTLE_ENDIAN)
|
||||
#define __LITTLE_ENDIAN__
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
#define __LITTLE_ENDIAN__
|
||||
#endif
|
||||
#elif (__BYTE_ORDER == __BIG_ENDIAN)
|
||||
#define __BIG_ENDIAN__
|
||||
#ifndef __BIG_ENDIAN__
|
||||
#define __BIG_ENDIAN__
|
||||
#endif
|
||||
#else
|
||||
#error Unknown machine endianness detected.
|
||||
#endif
|
||||
#elif defined(__FreeBSD__)
|
||||
#include <sys/endian.h>
|
||||
#if (_BYTE_ORDER == _LITTLE_ENDIAN)
|
||||
#define __LITTLE_ENDIAN__
|
||||
#ifndef __LITTLE_ENDIAN__
|
||||
#define __LITTLE_ENDIAN__
|
||||
#endif
|
||||
#elif (_BYTE_ORDER == _BIG_ENDIAN)
|
||||
#define __BIG_ENDIAN__
|
||||
#ifndef __BIG_ENDIAN__
|
||||
#define __BIG_ENDIAN__
|
||||
#endif
|
||||
#else
|
||||
#error Unknown machine endianness detected.
|
||||
#endif
|
||||
|
||||
@@ -94,8 +94,8 @@ class OSGA_Archive : public osgDB::Archive
|
||||
typedef __int64 pos_type;
|
||||
typedef __int64 size_type;
|
||||
#else
|
||||
typedef unsigned long long pos_type;
|
||||
typedef unsigned long long size_type;
|
||||
typedef long long pos_type;
|
||||
typedef long long size_type;
|
||||
#endif
|
||||
|
||||
typedef std::pair<pos_type, size_type> PositionSizePair;
|
||||
|
||||
Reference in New Issue
Block a user