ソースを参照

fix linker issues.

Kim Kulling 5 年 前
コミット
02e5698a38

+ 9 - 9
code/CMakeLists.txt

@@ -864,15 +864,15 @@ if ((CMAKE_COMPILER_IS_MINGW) AND (CMAKE_BUILD_TYPE MATCHES Debug))
   SET_SOURCE_FILES_PROPERTIES(Importer/StepFile/StepFileGen1.cpp PROPERTIES STATIC_LIBRARY_FLAGS -Os )
 endif()
 
-ADD_ASSIMP_IMPORTER( STEP
-    Step/STEPFile.h
-    Importer/StepFile/StepFileImporter.h
-    Importer/StepFile/StepFileImporter.cpp
-    Importer/StepFile/StepFileGen1.cpp
-    Importer/StepFile/StepFileGen2.cpp
-    Importer/StepFile/StepFileGen3.cpp
-    Importer/StepFile/StepReaderGen.h
-)
+#ADD_ASSIMP_IMPORTER( STEP
+#    Step/STEPFile.h
+#    Importer/StepFile/StepFileImporter.h
+#    Importer/StepFile/StepFileImporter.cpp
+#    Importer/StepFile/StepFileGen1.cpp
+#    Importer/StepFile/StepFileGen2.cpp
+#    Importer/StepFile/StepFileGen3.cpp
+#    Importer/StepFile/StepReaderGen.h
+#)
 
 ADD_ASSIMP_EXPORTER( STEP
     Step/StepExporter.h

+ 6 - 8
code/Common/ImporterRegistry.cpp

@@ -5,8 +5,6 @@ Open Asset Import Library (assimp)
 
 Copyright (c) 2006-2020, assimp team
 
-
-
 All rights reserved.
 
 Redistribution and use of this software in source and binary forms,
@@ -200,9 +198,9 @@ corresponding preprocessor flag to selectively disable formats.
 #ifndef ASSIMP_BUILD_NO_M3D_IMPORTER
 #   include "M3D/M3DImporter.h"
 #endif
-#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
-#   include "Importer/StepFile/StepFileImporter.h"
-#endif
+//#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
+//#   include "Importer/StepFile/StepFileImporter.h"
+//#endif
 
 namespace Assimp {
 
@@ -361,9 +359,9 @@ void GetImporterInstanceList(std::vector< BaseImporter* >& out)
 #ifndef ASSIMP_BUILD_NO_MMD_IMPORTER
     out.push_back( new MMDImporter() );
 #endif
-#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
-    out.push_back(new StepFile::StepFileImporter());
-#endif
+//#ifndef ASSIMP_BUILD_NO_STEP_IMPORTER
+//    out.push_back(new StepFile::StepFileImporter());
+//#endif
 }
 
 /** will delete all registered importers. */

+ 7 - 8
code/Importer/StepFile/StepFileGen1.cpp

@@ -225,7 +225,7 @@ namespace {
 ,		SchemaEntry("presentation_representation_select",NULL )
 ,		SchemaEntry("presentation_size_assignment_select",NULL )
 ,		SchemaEntry("presentation_style_select",NULL )
-,		SchemaEntry("presented_item_select",NULL )
+//,		SchemaEntry("presented_item_select",NULL )
 ,		SchemaEntry("pressure_measure",NULL )
 ,		SchemaEntry("product_definition_or_assembly_relationship",NULL )
 ,		SchemaEntry("product_definition_or_breakdown_element_usage",NULL )
@@ -397,7 +397,7 @@ namespace {
 ,		SchemaEntry("applied_organizational_project_assignment",&STEP::ObjectHelper<applied_organizational_project_assignment,1>::Construct )
 ,		SchemaEntry("person_and_organization_assignment",&STEP::ObjectHelper<person_and_organization_assignment,2>::Construct )
 ,		SchemaEntry("applied_person_and_organization_assignment",&STEP::ObjectHelper<applied_person_and_organization_assignment,1>::Construct )
-,		SchemaEntry("presented_item",&STEP::ObjectHelper<presented_item,0>::Construct )
+//,		SchemaEntry("presented_item",&STEP::ObjectHelper<presented_item,0>::Construct )
 ,		SchemaEntry("applied_presented_item",&STEP::ObjectHelper<applied_presented_item,1>::Construct )
 ,		SchemaEntry("security_classification_assignment",&STEP::ObjectHelper<security_classification_assignment,1>::Construct )
 ,		SchemaEntry("applied_security_classification_assignment",&STEP::ObjectHelper<applied_security_classification_assignment,1>::Construct )
@@ -1014,7 +1014,7 @@ namespace {
 ,		SchemaEntry("presentation_size",&STEP::ObjectHelper<NotImplemented,0>::Construct )
 ,		SchemaEntry("presentation_style_assignment",&STEP::ObjectHelper<presentation_style_assignment,1>::Construct )
 ,		SchemaEntry("presentation_style_by_context",&STEP::ObjectHelper<presentation_style_by_context,1>::Construct )
-,		SchemaEntry("presented_item_representation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
+//,		SchemaEntry("presented_item_representation",&STEP::ObjectHelper<NotImplemented,0>::Construct )
 ,		SchemaEntry("pressure_measure_with_unit",&STEP::ObjectHelper<pressure_measure_with_unit,0>::Construct )
 ,		SchemaEntry("pressure_unit",&STEP::ObjectHelper<pressure_unit,0>::Construct )
 ,		SchemaEntry("procedural_representation",&STEP::ObjectHelper<procedural_representation,0>::Construct )
@@ -1359,11 +1359,10 @@ template <> size_t GenericFill<absorbed_dose_unit>(const DB& db, const LIST& par
 	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to absorbed_dose_unit"); }	return base;
 }
 // -----------------------------------------------------------------------------------------------------------
-/*template <> size_t GenericFill<abstract_variable>(const DB& db, const LIST& params, abstract_variable* in)
-{
+template <> size_t GenericFill<abstract_variable>(const DB&, const LIST&, abstract_variable*) {
 	size_t base = 0;
 	return base;
-}*/
+}
 // -----------------------------------------------------------------------------------------------------------
 template <> size_t GenericFill<acceleration_measure_with_unit>(const DB& db, const LIST& params, acceleration_measure_with_unit* in)
 {
@@ -1680,11 +1679,11 @@ template <> size_t GenericFill<amount_of_substance_unit>(const DB& db, const LIS
 	if (params.GetSize() < 1) { throw STEP::TypeError("expected 1 arguments to amount_of_substance_unit"); }	return base;
 }
 // -----------------------------------------------------------------------------------------------------------
-/*template <> size_t GenericFill<angle_direction_reference>(const DB& db, const LIST& params, angle_direction_reference* in)
+template <> size_t GenericFill<angle_direction_reference>(const DB&, const LIST&, angle_direction_reference*)
 {
 	size_t base = 0;
 	return base;
-}*/
+}
 // -----------------------------------------------------------------------------------------------------------
 template <> size_t GenericFill<representation_item>(const DB& db, const LIST& params, representation_item* in)
 {

+ 3 - 3
code/Importer/StepFile/StepReaderGen.h

@@ -404,7 +404,7 @@ namespace StepFile {
     // C++ wrapper type for presentation_style_select
     typedef SELECT presentation_style_select;
     // C++ wrapper type for presented_item_select
-    typedef SELECT presented_item_select;
+    //typedef SELECT presented_item_select;
     // C++ wrapper type for pressure_measure
     typedef REAL pressure_measure;
     // C++ wrapper type for product_definition_or_assembly_relationship
@@ -545,7 +545,7 @@ namespace StepFile {
 	struct absorbed_dose_measure_with_unit;
 	struct derived_unit;
 	struct absorbed_dose_unit;
-	struct abstract_variable;
+	//struct abstract_variable;
 	struct acceleration_measure_with_unit;
 	struct acceleration_unit;
 	struct action;
@@ -646,7 +646,7 @@ namespace StepFile {
 	struct applied_organizational_project_assignment;
 	struct person_and_organization_assignment;
 	struct applied_person_and_organization_assignment;
-	struct presented_item;
+	//struct presented_item;
 	struct applied_presented_item;
 	struct security_classification_assignment;
 	struct applied_security_classification_assignment;

+ 2 - 1
test/unit/utSortByPType.cpp

@@ -183,7 +183,8 @@ TEST_F(SortByPTypeProcessTest, SortByPTypeStep) {
     unsigned int idx = 0;
     for (unsigned int m = 0,real = 0; m< 10;++m) {
         for (unsigned int n = 0; n < 4;++n) {
-            if ((idx = num[m][n])) {
+            idx = num[m][n])
+            if (idx) {
                 EXPECT_TRUE(real < mScene->mNumMeshes);
 
                 aiMesh* mesh = mScene->mMeshes[real];