From 7b3fa5ebc2b1c2ad8266f0d920a379f1d666bd20 Mon Sep 17 00:00:00 2001 From: Richard Date: Sun, 17 May 2015 20:22:31 -0600 Subject: [PATCH] Refactor: Delete unused forward decls, delete unused function --- code/IFCLoader.cpp | 24 ++++++------------------ 1 file changed, 6 insertions(+), 18 deletions(-) diff --git a/code/IFCLoader.cpp b/code/IFCLoader.cpp index 34f176c89..8ffefcb91 100644 --- a/code/IFCLoader.cpp +++ b/code/IFCLoader.cpp @@ -60,9 +60,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "StreamReader.h" #include "MemoryIOWrapper.h" -#include "../include/assimp/scene.h" -#include "../include/assimp/Importer.hpp" - +#include "../include/assimp/scene.h" +#include "../include/assimp/Importer.hpp" + namespace Assimp { template<> const std::string LogFunctions::log_prefix = "IFC: "; @@ -93,8 +93,6 @@ namespace { void SetUnits(ConversionData& conv); void SetCoordinateSpace(ConversionData& conv); void ProcessSpatialStructures(ConversionData& conv); -aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el ,ConversionData& conv); -void ProcessProductRepresentation(const IfcProduct& el, aiNode* nd, ConversionData& conv); void MakeTreeRelative(ConversionData& conv); void ConvertUnit(const EXPRESS::DataType& dt,ConversionData& conv); @@ -421,16 +419,6 @@ void ResolveObjectPlacement(aiMatrix4x4& m, const IfcObjectPlacement& place, Con } } -// ------------------------------------------------------------------------------------------------ -void GetAbsTransform(aiMatrix4x4& out, const aiNode* nd, ConversionData& conv) -{ - aiMatrix4x4 t; - if (nd->mParent) { - GetAbsTransform(t,nd->mParent,conv); - } - out = t*nd->mTransformation; -} - // ------------------------------------------------------------------------------------------------ bool ProcessMappedItem(const IfcMappedItem& mapped, aiNode* nd_src, std::vector< aiNode* >& subnodes_src, unsigned int matid, ConversionData& conv) { @@ -682,14 +670,14 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion // skip over space and annotation nodes - usually, these have no meaning in Assimp's context bool skipGeometry = false; if(conv.settings.skipSpaceRepresentations) { - if(const IfcSpace* const space = el.ToPtr()) { + if(el.ToPtr()) { IFCImporter::LogDebug("skipping IfcSpace entity due to importer settings"); skipGeometry = true; } } if(conv.settings.skipAnnotations) { - if(const IfcAnnotation* const ann = el.ToPtr()) { + if(el.ToPtr()) { IFCImporter::LogDebug("skipping IfcAnnotation entity due to importer settings"); return NULL; } @@ -764,7 +752,7 @@ aiNode* ProcessSpatialStructure(aiNode* parent, const IfcProduct& el, Conversion continue; } BOOST_FOREACH(const IfcProduct& pro, cont->RelatedElements) { - if(const IfcOpeningElement* const open = pro.ToPtr()) { + if(pro.ToPtr()) { // IfcOpeningElement is handled below. Sadly we can't use it here as is: // The docs say that opening elements are USUALLY attached to building storey, // but we want them for the building elements to which they belong.