mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-18 06:21:40 +00:00
Broaden __eq__ for type decl instances
This commit is contained in:
@@ -468,10 +468,11 @@ private:
|
|||||||
|
|
||||||
bool __eq__(const express::Base& other) const {
|
bool __eq__(const express::Base& other) const {
|
||||||
// This logic is not perfect and is not fully consistent with __hash__
|
// This logic is not perfect and is not fully consistent with __hash__
|
||||||
// Should there also be a distinction between entity instances and type declarations?
|
|
||||||
if ($self->identity() == other.identity()) {
|
if ($self->identity() == other.identity()) {
|
||||||
return true;
|
return true;
|
||||||
} else if ($self->file() != other.file()) {
|
} else if (&$self->declaration() != &other.declaration()) {
|
||||||
|
return false;
|
||||||
|
} else if (($self->file() != other.file()) || ($self->declaration().as_entity() == nullptr)) {
|
||||||
// PyGILState_STATE gil = PyGILState_Ensure();
|
// PyGILState_STATE gil = PyGILState_Ensure();
|
||||||
// @todo get_info_2 is actually implemented in C++, so we try to call it directly
|
// @todo get_info_2 is actually implemented in C++, so we try to call it directly
|
||||||
bool result = false;
|
bool result = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user