Skip to content

Commit 14e9846

Browse files
committed
identity_ for types; id_ for instances
1 parent 37c6aea commit 14e9846

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎src/ifcparse/instance_data.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -494,7 +494,7 @@ class IFC_PARSE_API instance_data {
494494
}
495495
#ifdef IFOPSH_WITH_ROCKSDB
496496
else {
497-
rocks_db_attribute_storage{}.set(get_storage_of_type<ifcopenshell::impl::rocks_db_file_storage>(), declaration_, identity_, attribute_index, value);
497+
rocks_db_attribute_storage{}.set(get_storage_of_type<ifcopenshell::impl::rocks_db_file_storage>(), declaration_, declaration_->as_entity() ? id_ : identity_, attribute_index, value);
498498
}
499499
#endif
500500
}
@@ -506,7 +506,7 @@ class IFC_PARSE_API instance_data {
506506
}
507507
#ifdef IFOPSH_WITH_ROCKSDB
508508
else {
509-
return rocks_db_attribute_storage{}.has<T>(get_storage_of_type<ifcopenshell::impl::rocks_db_file_storage>(), declaration_, identity_, attribute_index);
509+
return rocks_db_attribute_storage{}.has<T>(get_storage_of_type<ifcopenshell::impl::rocks_db_file_storage>(), declaration_, declaration_->as_entity() ? id_ : identity_, attribute_index);
510510
}
511511
#endif
512512
}

‎src/ifcparse/parse.cpp‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2957,7 +2957,7 @@ attribute_value instance_data::get_attribute_value(size_t index) const
29572957
return nullptr;
29582958
}
29592959
}, file_->storage_);
2960-
return attribute_value(storage, identity_, declaration_, (uint8_t) index);
2960+
return attribute_value(storage, declaration_->as_entity() ? id_ : identity_, declaration_, (uint8_t)index);
29612961
}
29622962
}
29632963

0 commit comments

Comments
 (0)