Fix the -Werror=unused-but-set-parameter warning by removing the skipFirst variable.

pull/4056/head
Doug Roeper 2021-08-30 18:15:37 -04:00
parent 5e86fead8e
commit 96f0787f51
No known key found for this signature in database
GPG Key ID: 87038190C453E8B3
2 changed files with 3 additions and 6 deletions

View File

@ -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) { if (!nd) {
ThrowException("failure reading <world>"); ThrowException("failure reading <world>");
} }
@ -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; aiNode *nd = new aiNode;
std::vector<aiNode *> children; std::vector<aiNode *> children;
std::vector<unsigned int> meshes; std::vector<unsigned int> meshes;
try { try {
for (XmlNode &child : node.children()) { for (XmlNode &child : node.children()) {
skipFirst = false;
const std::string &s = ai_stdStrToLower(child.name()); const std::string &s = ai_stdStrToLower(child.name());
if (s == "mesh") { if (s == "mesh") {
const size_t prev = scope.meshes_linear.size(); const size_t prev = scope.meshes_linear.size();

View File

@ -185,7 +185,7 @@ private:
void ReadWorld(XmlNode &node, TempScope &scope); void ReadWorld(XmlNode &node, TempScope &scope);
void ReadLighting(XmlNode &node, TempScope &scope); void ReadLighting(XmlNode &node, TempScope &scope);
aiLight *ReadDirectionalLight(XmlNode &node); 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); bool ReadMesh(XmlNode &node, TempScope &scope);
void ReadMaterial(XmlNode &node, TempScope &scope); void ReadMaterial(XmlNode &node, TempScope &scope);
aiVector2D ReadVec2(XmlNode &node); aiVector2D ReadVec2(XmlNode &node);