Skip to content

Commit fbbc92c

Browse files
committed
Hashing solely based on identity
1 parent 5748270 commit fbbc92c

1 file changed

Lines changed: 8 additions & 3 deletions

File tree

‎src/ifcwrap/IfcParseWrapper.i‎

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -470,9 +470,13 @@ private:
470470
}
471471

472472
size_t __hash__() const {
473-
if (!self->declaration().as_entity()) {
474-
return boost::hash<std::tuple<uint32_t, void*>>{}({self->identity(), self->file()});
475-
} else {
473+
return boost::hash<std::tuple<uint32_t, void*>>{}({self->identity(), self->file()});
474+
// if (self->declaration().as_entity()) {
475+
// }
476+
}
477+
478+
/*
479+
else {
476480
return self->get_attribute_value(0).apply_visitor([&](const auto& val){
477481
using U = std::decay_t<decltype(val)>;
478482
if constexpr (std::is_same_v<U, Blank> || std::is_same_v<U, Derived> || std::is_same_v<U, boost::logic::tribool> || std::is_same_v<U, EnumerationReference> || std::is_same_v<U, empty_aggregate_t> || std::is_same_v<U, empty_aggregate_of_aggregate_t>) {
@@ -484,6 +488,7 @@ private:
484488
});
485489
}
486490
}
491+
*/
487492

488493
std::string __repr__() const {
489494
std::ostringstream oss;

0 commit comments

Comments
 (0)