A few fixes of types and a typo (#1464)

This commit is contained in:
ahladik
2021-05-13 21:11:19 +02:00
committed by GitHub
parent 81ad689478
commit 6ec23faf26
4 changed files with 11 additions and 11 deletions
@@ -88,7 +88,7 @@ IfcUtil::IfcBaseClass* execute_based_on_schema(
return fn_4x3_rc1(shape, t); return fn_4x3_rc1(shape, t);
} }
#endif #endif
#ifdef HAS_SCHEMA_4x3_rx2 #ifdef HAS_SCHEMA_4x3_rc2
if (schema_name_lower == "ifc4x3_rc2") { if (schema_name_lower == "ifc4x3_rc2") {
return fn_4x3_rc2(shape, t); return fn_4x3_rc2(shape, t);
} }
+3 -3
View File
@@ -64,12 +64,12 @@ public:
boost::shared_ptr<IfcEntityList> getInverse (const IfcParse::declaration* type, int attribute_index) const; boost::shared_ptr<IfcEntityList> 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 // 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) { if (type_ == 0) {
return 0; return 0;
} }
+6 -6
View File
@@ -1038,7 +1038,7 @@ IfcEntityInstanceData::IfcEntityInstanceData(const IfcEntityInstanceData& e) {
type_ = e.type_; type_ = e.type_;
id_ = 0; id_ = 0;
const unsigned int count = e.getArgumentCount(); const size_t count = e.getArgumentCount();
// In order not to have the instance read from file // In order not to have the instance read from file
attributes_ = new Argument*[count]; attributes_ = new Argument*[count];
@@ -1051,7 +1051,7 @@ IfcEntityInstanceData::IfcEntityInstanceData(const IfcEntityInstanceData& e) {
static IfcParse::NullArgument static_null_attribute; static IfcParse::NullArgument static_null_attribute;
Argument* IfcEntityInstanceData::getArgument(unsigned int i) const { Argument* IfcEntityInstanceData::getArgument(size_t i) const {
if (attributes_ == 0) { if (attributes_ == 0) {
load(); load();
} }
@@ -1152,7 +1152,7 @@ public:
if (attribute_) { if (attribute_) {
apply_attribute_(t, attribute_); apply_attribute_(t, attribute_);
} else { } else {
for (unsigned i = 0; i < data_->getArgumentCount(); ++i) { for (size_t i = 0; i < data_->getArgumentCount(); ++i) {
Argument* attr = data_->getArgument(i); Argument* attr = data_->getArgument(i);
apply_attribute_(t, attr); 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) { if (attributes_ == 0) {
load(); load();
} }
@@ -1603,7 +1603,7 @@ IfcUtil::IfcBaseClass* IfcFile::addEntity(IfcUtil::IfcBaseClass* entity) {
// information needs to be accounted for for IfcLengthMeasures. // information needs to be accounted for for IfcLengthMeasures.
double conversion_factor = std::numeric_limits<double>::quiet_NaN(); double conversion_factor = std::numeric_limits<double>::quiet_NaN();
for (unsigned i = 0; i < we->getArgumentCount(); ++i) { for (size_t i = 0; i < we->getArgumentCount(); ++i) {
Argument* attr = we->getArgument(i); Argument* attr = we->getArgument(i);
IfcUtil::ArgumentType attr_type = attr->type(); IfcUtil::ArgumentType attr_type = attr->type();
@@ -1819,7 +1819,7 @@ void IfcFile::process_deletion_() {
continue; 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); Argument* attr = related_instance->data().getArgument(i);
if (attr->isNull()) continue; if (attr->isNull()) continue;
+1 -1
View File
@@ -50,7 +50,7 @@ protected:
} }
public: public:
virtual unsigned int getArgumentCount() const { virtual size_t getArgumentCount() const {
return size_; return size_;
} }