From 4dd0782549190dc71c2446c988adb59c75b9e112 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Thu, 16 Jun 2011 18:43:58 +0000 Subject: [PATCH] Fixed warnings. --- src/osgPlugins/fbx/ReaderWriterFBX.cpp | 2 +- src/osgPlugins/fbx/WriterNodeVisitor.cpp | 11 ++++++----- src/osgPlugins/fbx/WriterNodeVisitor.h | 8 ++++---- 3 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/osgPlugins/fbx/ReaderWriterFBX.cpp b/src/osgPlugins/fbx/ReaderWriterFBX.cpp index 71b8f76ba..2d2b7c727 100644 --- a/src/osgPlugins/fbx/ReaderWriterFBX.cpp +++ b/src/osgPlugins/fbx/ReaderWriterFBX.cpp @@ -309,7 +309,7 @@ ReaderWriterFBX::readNode(const std::string& filenameInit, fbxString appName = pDocInfo->LastSaved_ApplicationName.Get(); - for (int i = 0; i < sizeof(authoringTools) / sizeof(authoringTools[0]); ++i) + for (unsigned int i = 0; i < sizeof(authoringTools) / sizeof(authoringTools[0]); ++i) { if (0 == #ifdef WIN32 diff --git a/src/osgPlugins/fbx/WriterNodeVisitor.cpp b/src/osgPlugins/fbx/WriterNodeVisitor.cpp index f9b2c809a..904431e0a 100644 --- a/src/osgPlugins/fbx/WriterNodeVisitor.cpp +++ b/src/osgPlugins/fbx/WriterNodeVisitor.cpp @@ -37,16 +37,17 @@ public: ListTriangle& listTriangles, unsigned int drawable_n, unsigned int material) : + _drawable_n(drawable_n), + _listTriangles(listTriangles), + _modeCache(0), _hasNormalCoords(geo->getNormalArray() != NULL), _hasTexCoords(geo->getTexCoordArray(0) != NULL), _geo(geo), _lastFaceIndex(0), - _listTriangles(listTriangles), - _drawable_n(drawable_n), _material(material), - //_iPrimitiveSet(iPrimitiveSet), _curNormalIndex(0), - _normalBinding(geo->getNormalBinding()) + _normalBinding(geo->getNormalBinding()), + _mesh(0) { if (!geo->getNormalArray() || geo->getNormalArray()->getNumElements()==0) { @@ -286,9 +287,9 @@ WriterNodeVisitor::Material::Material(WriterNodeVisitor& writerNodeVisitor, KFbxSdkManager* pSdkManager, const osgDB::ReaderWriter::Options * options, int index) : - _index(index), _fbxMaterial(NULL), _fbxTexture(NULL), + _index(index), _osgImage(NULL) { osg::Vec4 diffuse(1,1,1,1), diff --git a/src/osgPlugins/fbx/WriterNodeVisitor.h b/src/osgPlugins/fbx/WriterNodeVisitor.h index 8bf8bdf5f..a1e8246b4 100644 --- a/src/osgPlugins/fbx/WriterNodeVisitor.h +++ b/src/osgPlugins/fbx/WriterNodeVisitor.h @@ -76,14 +76,14 @@ class WriterNodeVisitor: public osg::NodeVisitor const osgDB::ReaderWriter::Options* options, const std::string& srcDirectory) : osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN), - _pScene(pScene), _pSdkManager(pSdkManager), + _succeedLastApply(true), + _pScene(pScene), + _curFbxNode(pScene->GetRootNode()), _currentStateSet(new osg::StateSet()), _lastMaterialIndex(0), _lastMeshIndex(0), - _curFbxNode(pScene->GetRootNode()), _options(options), - _succeedLastApply(true), _externalWriter(srcDirectory, osgDB::getFilePath(fileName), true, 0) {} @@ -175,7 +175,7 @@ class WriterNodeVisitor: public osg::NodeVisitor private: KFbxSurfacePhong* _fbxMaterial; - KFbxFileTexture* _fbxTexture; + KFbxFileTexture* _fbxTexture; int _index;///< Index in the Map const osg::Image* _osgImage; };