diff --git a/code/AssetLib/X3D/X3DImporter_Macro.hpp b/code/AssetLib/X3D/X3DImporter_Macro.hpp index 08aac3da7..6d4c61c3f 100644 --- a/code/AssetLib/X3D/X3DImporter_Macro.hpp +++ b/code/AssetLib/X3D/X3DImporter_Macro.hpp @@ -63,15 +63,12 @@ inline X3DNodeElementBase *X3DImporter::MACRO_USE_CHECKANDAPPLY(XmlNode &node, s if (nullptr == mNodeElementCur) { printf("here\n"); } - - //do { - checkNodeMustBeEmpty(node); - if (!pDEF.empty()) - Assimp::Throw_DEF_And_USE(node.name()); - if (!FindNodeElement(pUSE, pType, &pNE)) - Assimp::Throw_USE_NotFound(node.name(), pUSE); - mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */ - //} while (false); + checkNodeMustBeEmpty(node); + if (!pDEF.empty()) + Assimp::Throw_DEF_And_USE(node.name()); + if (!FindNodeElement(pUSE, pType, &pNE)) + Assimp::Throw_USE_NotFound(node.name(), pUSE); + mNodeElementCur->Children.push_back(pNE); /* add found object as child to current element */ return pNE; } diff --git a/test/unit/utX3DImportExport.cpp b/test/unit/utX3DImportExport.cpp index 0d753c889..a6ad618ab 100644 --- a/test/unit/utX3DImportExport.cpp +++ b/test/unit/utX3DImportExport.cpp @@ -51,7 +51,7 @@ class utX3DImportExport : public AbstractImportExportBase { public: bool importerTest() override { Assimp::Importer importer; - const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X3D/ComputerKeyboard.x3d", aiProcess_ValidateDataStructure); + const aiScene *scene = importer.ReadFile(ASSIMP_TEST_MODELS_DIR "/X3D/HelloX3dTrademark.x3d", aiProcess_ValidateDataStructure); return nullptr != scene; } };