Переглянути джерело

- fix some -Wall warnings

acgessler 13 роки тому
батько
коміт
879f2ed177

+ 3 - 3
code/FBXDocument.cpp

@@ -465,8 +465,8 @@ Geometry::~Geometry()
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 Document::Document(const Parser& parser, const ImportSettings& settings)
 Document::Document(const Parser& parser, const ImportSettings& settings)
-: parser(parser)
-, settings(settings)
+: settings(settings)
+, parser(parser)
 {
 {
 	// cannot use array default initialization syntax because vc8 fails on it
 	// cannot use array default initialization syntax because vc8 fails on it
 	for (unsigned int i = 0; i < 7; ++i) {
 	for (unsigned int i = 0; i < 7; ++i) {
@@ -707,9 +707,9 @@ std::vector<const Connection*> Document::GetConnectionsByDestinationSequenced(ui
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 Connection::Connection(uint64_t insertionOrder,  uint64_t src, uint64_t dest, const std::string& prop, const Document& doc)
 Connection::Connection(uint64_t insertionOrder,  uint64_t src, uint64_t dest, const std::string& prop, const Document& doc)
 : insertionOrder(insertionOrder)
 : insertionOrder(insertionOrder)
+, prop(prop)
 , src(src)
 , src(src)
 , dest(dest)
 , dest(dest)
-, prop(prop)
 , doc(doc)
 , doc(doc)
 {
 {
 	ai_assert(doc.Objects().find(src) != doc.Objects().end());
 	ai_assert(doc.Objects().find(src) != doc.Objects().end());

+ 0 - 3
code/FBXMeshGeometry.cpp

@@ -72,9 +72,6 @@ MeshGeometry::MeshGeometry(uint64_t id, const Element& element, const std::strin
 
 
 	// optional Mesh elements:
 	// optional Mesh elements:
 	const ElementCollection& Layer = sc->GetCollection("Layer");
 	const ElementCollection& Layer = sc->GetCollection("Layer");
-	const ElementCollection& LayerElementMaterial = sc->GetCollection("LayerElementMaterial");
-	const ElementCollection& LayerElementUV = sc->GetCollection("LayerElementUV");
-	const ElementCollection& LayerElementNormal = sc->GetCollection("LayerElementNormal");
 
 
 	std::vector<aiVector3D> tempVerts;
 	std::vector<aiVector3D> tempVerts;
 	ReadVectorDataArray(tempVerts,Vertices);
 	ReadVectorDataArray(tempVerts,Vertices);

+ 2 - 3
code/FBXParser.cpp

@@ -165,9 +165,9 @@ Scope::~Scope()
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 Parser::Parser (const TokenList& tokens)
 Parser::Parser (const TokenList& tokens)
 : tokens(tokens)
 : tokens(tokens)
-, cursor(tokens.begin())
-, current()
 , last()
 , last()
+, current()
+, cursor(tokens.begin())
 {
 {
 	root.reset(new Scope(*this,true));
 	root.reset(new Scope(*this,true));
 }
 }
@@ -276,7 +276,6 @@ float ParseTokenAsFloat(const Token& t, const char*& err_out)
 		return 0.0f;
 		return 0.0f;
 	}
 	}
 
 
-	const char* inout = t.begin();
 
 
 	// need to copy the input string to a temporary buffer
 	// need to copy the input string to a temporary buffer
 	// first - next in the fbx token stream comes ',', 
 	// first - next in the fbx token stream comes ',', 

+ 4 - 4
code/FBXProperties.cpp

@@ -129,15 +129,15 @@ std::string PeekPropertyName(const Element& element)
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 PropertyTable::PropertyTable()
 PropertyTable::PropertyTable()
-: element()
-, templateProps()
+: templateProps()
+, element()
 {
 {
 }
 }
 
 
 // ------------------------------------------------------------------------------------------------
 // ------------------------------------------------------------------------------------------------
 PropertyTable::PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps)
 PropertyTable::PropertyTable(const Element& element, boost::shared_ptr<const PropertyTable> templateProps)
-: element(&element)
-, templateProps(templateProps)
+: templateProps(templateProps)
+, element(&element)
 {
 {
 	const Scope& scope = GetRequiredScope(element);
 	const Scope& scope = GetRequiredScope(element);
 	BOOST_FOREACH(const ElementMap::value_type& v, scope.Elements()) {
 	BOOST_FOREACH(const ElementMap::value_type& v, scope.Elements()) {

+ 2 - 2
code/IFCMaterial.cpp

@@ -123,10 +123,10 @@ void FillMaterial(aiMaterial* mat,const IFC::IfcSurfaceStyle* surf,ConversionDat
 					}
 					}
 				}
 				}
 			}
 			}
-		}
+		} /*
 		else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
 		else if (const IFC::IfcSurfaceStyleWithTextures* tex = sel2->ResolveSelectPtr<IFC::IfcSurfaceStyleWithTextures>(conv.db)) {
 			// XXX
 			// XXX
-		}
+		} */
 	}
 	}
 
 
 }
 }

+ 1 - 2
code/M3Importer.cpp

@@ -113,8 +113,7 @@ void M3Importer::InternReadFile( const std::string& pFile, aiScene* pScene, IOSy
 	}
 	}
 
 
 	m_Buffer.resize( filesize );
 	m_Buffer.resize( filesize );
-	size_t readsize = file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize );
-	ai_assert( readsize == filesize );
+	file->Read( &m_Buffer[ 0 ], sizeof( unsigned char ), filesize );
 
 
 	m_pHead = reinterpret_cast<MD33*>( &m_Buffer[ 0 ] );
 	m_pHead = reinterpret_cast<MD33*>( &m_Buffer[ 0 ] );
 	m_pRefs = reinterpret_cast<ReferenceEntry*>( &m_Buffer[ 0 ] + m_pHead->ofsRefs );
 	m_pRefs = reinterpret_cast<ReferenceEntry*>( &m_Buffer[ 0 ] + m_pHead->ofsRefs );

+ 1 - 1
code/XGLLoader.cpp

@@ -394,7 +394,7 @@ aiNode* XGLImporter::ReadObject(TempScope& scope, bool skipFirst, const char* cl
 				// XXX
 				// XXX
 			}
 			}
 			else if (s == "meshref") {
 			else if (s == "meshref") {
-				const int id = ReadIndexFromText();
+				const unsigned int id = static_cast<unsigned int>( ReadIndexFromText() );
 
 
 				std::multimap<unsigned int, aiMesh*>::iterator it = scope.meshes.find(id), end = scope.meshes.end();
 				std::multimap<unsigned int, aiMesh*>::iterator it = scope.meshes.find(id), end = scope.meshes.end();
 				if (it == end) {
 				if (it == end) {

+ 4 - 4
contrib/poly2tri/poly2tri/common/shapes.cc

@@ -119,10 +119,10 @@ void Triangle::ClearDelunayEdges()
 Point* Triangle::OppositePoint(Triangle& t, Point& p)
 Point* Triangle::OppositePoint(Triangle& t, Point& p)
 {
 {
   Point *cw = t.PointCW(p);
   Point *cw = t.PointCW(p);
-  double x = cw->x;
-  double y = cw->y;
-  x = p.x;
-  y = p.y;
+  //double x = cw->x;
+  //double y = cw->y;
+  //x = p.x;
+  //y = p.y;
   return PointCW(*cw);
   return PointCW(*cw);
 }
 }
 
 

+ 1 - 1
contrib/poly2tri/poly2tri/sweep/sweep.cc

@@ -754,7 +754,7 @@ void Sweep::FlipScanEdgeEvent(SweepContext& tcx, Point& ep, Point& eq, Triangle&
 Sweep::~Sweep() {
 Sweep::~Sweep() {
 
 
     // Clean up memory
     // Clean up memory
-    for(int i = 0; i < nodes_.size(); i++) {
+    for(unsigned int i = 0; i < nodes_.size(); i++) {
         delete nodes_[i];
         delete nodes_[i];
     }
     }