From 96f0787f51e91b759132ef5ecf631dd530e749f0 Mon Sep 17 00:00:00 2001 From: Doug Roeper Date: Mon, 30 Aug 2021 18:15:37 -0400 Subject: [PATCH] Fix the -Werror=unused-but-set-parameter warning by removing the skipFirst variable. --- code/AssetLib/XGL/XGLLoader.cpp | 7 ++----- code/AssetLib/XGL/XGLLoader.h | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/code/AssetLib/XGL/XGLLoader.cpp b/code/AssetLib/XGL/XGLLoader.cpp index 20c2c7079..bbfa31829 100644 --- a/code/AssetLib/XGL/XGLLoader.cpp +++ b/code/AssetLib/XGL/XGLLoader.cpp @@ -250,7 +250,7 @@ void XGLImporter::ReadWorld(XmlNode &node, TempScope &scope) { } } - aiNode *const nd = ReadObject(node, scope, true); + aiNode *const nd = ReadObject(node, scope); if (!nd) { ThrowException("failure reading "); } @@ -296,16 +296,13 @@ aiLight *XGLImporter::ReadDirectionalLight(XmlNode &node) { } // ------------------------------------------------------------------------------------------------ -aiNode *XGLImporter::ReadObject(XmlNode &node, TempScope &scope, bool skipFirst/*, const char *closetag */) { +aiNode *XGLImporter::ReadObject(XmlNode &node, TempScope &scope) { aiNode *nd = new aiNode; std::vector children; std::vector meshes; try { for (XmlNode &child : node.children()) { - - skipFirst = false; - const std::string &s = ai_stdStrToLower(child.name()); if (s == "mesh") { const size_t prev = scope.meshes_linear.size(); diff --git a/code/AssetLib/XGL/XGLLoader.h b/code/AssetLib/XGL/XGLLoader.h index f7da4e0a7..a2b224ac9 100644 --- a/code/AssetLib/XGL/XGLLoader.h +++ b/code/AssetLib/XGL/XGLLoader.h @@ -185,7 +185,7 @@ private: void ReadWorld(XmlNode &node, TempScope &scope); void ReadLighting(XmlNode &node, TempScope &scope); aiLight *ReadDirectionalLight(XmlNode &node); - aiNode *ReadObject(XmlNode &node, TempScope &scope, bool skipFirst = false/*, const char *closetag = "object"*/); + aiNode *ReadObject(XmlNode &node, TempScope &scope); bool ReadMesh(XmlNode &node, TempScope &scope); void ReadMaterial(XmlNode &node, TempScope &scope); aiVector2D ReadVec2(XmlNode &node);