diff --git a/src/ifcgeom_schema_agnostic/Serialization.cpp b/src/ifcgeom_schema_agnostic/Serialization.cpp index 4c18055e07..11efb997f1 100644 --- a/src/ifcgeom_schema_agnostic/Serialization.cpp +++ b/src/ifcgeom_schema_agnostic/Serialization.cpp @@ -88,7 +88,7 @@ IfcUtil::IfcBaseClass* execute_based_on_schema( return fn_4x3_rc1(shape, t); } #endif -#ifdef HAS_SCHEMA_4x3_rx2 +#ifdef HAS_SCHEMA_4x3_rc2 if (schema_name_lower == "ifc4x3_rc2") { return fn_4x3_rc2(shape, t); } diff --git a/src/ifcparse/IfcEntityInstanceData.h b/src/ifcparse/IfcEntityInstanceData.h index 6fb0386f38..3b92ea2826 100644 --- a/src/ifcparse/IfcEntityInstanceData.h +++ b/src/ifcparse/IfcEntityInstanceData.h @@ -64,12 +64,12 @@ public: boost::shared_ptr getInverse (const IfcParse::declaration* type, int attribute_index) const; - Argument* getArgument(unsigned int i) const; + Argument* getArgument(size_t i) const; // NB: This makes a copy of the argument - void setArgument(unsigned int i, Argument* a, IfcUtil::ArgumentType attr_type = IfcUtil::Argument_UNKNOWN); + void setArgument(size_t i, Argument* a, IfcUtil::ArgumentType attr_type = IfcUtil::Argument_UNKNOWN); - virtual unsigned int getArgumentCount() const { + virtual size_t getArgumentCount() const { if (type_ == 0) { return 0; } diff --git a/src/ifcparse/IfcParse.cpp b/src/ifcparse/IfcParse.cpp index e5385eaa6e..a6ad546582 100644 --- a/src/ifcparse/IfcParse.cpp +++ b/src/ifcparse/IfcParse.cpp @@ -1038,7 +1038,7 @@ IfcEntityInstanceData::IfcEntityInstanceData(const IfcEntityInstanceData& e) { type_ = e.type_; id_ = 0; - const unsigned int count = e.getArgumentCount(); + const size_t count = e.getArgumentCount(); // In order not to have the instance read from file attributes_ = new Argument*[count]; @@ -1051,7 +1051,7 @@ IfcEntityInstanceData::IfcEntityInstanceData(const IfcEntityInstanceData& e) { static IfcParse::NullArgument static_null_attribute; -Argument* IfcEntityInstanceData::getArgument(unsigned int i) const { +Argument* IfcEntityInstanceData::getArgument(size_t i) const { if (attributes_ == 0) { load(); } @@ -1152,7 +1152,7 @@ public: if (attribute_) { apply_attribute_(t, attribute_); } else { - for (unsigned i = 0; i < data_->getArgumentCount(); ++i) { + for (size_t i = 0; i < data_->getArgumentCount(); ++i) { Argument* attr = data_->getArgument(i); apply_attribute_(t, attr); } @@ -1161,7 +1161,7 @@ public: }; -void IfcEntityInstanceData::setArgument(unsigned int i, Argument* a, IfcUtil::ArgumentType attr_type) { +void IfcEntityInstanceData::setArgument(size_t i, Argument* a, IfcUtil::ArgumentType attr_type) { if (attributes_ == 0) { load(); } @@ -1603,7 +1603,7 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) { // information needs to be accounted for for IfcLengthMeasures. double conversion_factor = std::numeric_limits::quiet_NaN(); - for (unsigned i = 0; i < we->getArgumentCount(); ++i) { + for (size_t i = 0; i < we->getArgumentCount(); ++i) { Argument* attr = we->getArgument(i); IfcUtil::ArgumentType attr_type = attr->type(); @@ -1819,7 +1819,7 @@ void IfcFile::process_deletion_() { continue; } - for (unsigned i = 0; i < related_instance->data().getArgumentCount(); ++i) { + for (size_t i = 0; i < related_instance->data().getArgumentCount(); ++i) { Argument* attr = related_instance->data().getArgument(i); if (attr->isNull()) continue; diff --git a/src/ifcparse/IfcSpfHeader.h b/src/ifcparse/IfcSpfHeader.h index 9f18ccf35c..84280d7ed8 100644 --- a/src/ifcparse/IfcSpfHeader.h +++ b/src/ifcparse/IfcSpfHeader.h @@ -50,7 +50,7 @@ protected: } public: - virtual unsigned int getArgumentCount() const { + virtual size_t getArgumentCount() const { return size_; }