diff --git a/include/Engine/Core/EntityWrapper.h b/include/Engine/Core/EntityWrapper.h index 79f90f33..74b5fc56 100644 --- a/include/Engine/Core/EntityWrapper.h +++ b/include/Engine/Core/EntityWrapper.h @@ -28,6 +28,7 @@ struct EntityWrapper ComponentWrapper operator[](const char* componentName); bool operator==(const EntityWrapper& e) const; + bool operator!=(const EntityWrapper& e) const; explicit operator EntityID() const; operator bool(); }; diff --git a/src/Engine/Core/EntityWrapper.cpp b/src/Engine/Core/EntityWrapper.cpp index 8c1ab10d..5dc493ff 100644 --- a/src/Engine/Core/EntityWrapper.cpp +++ b/src/Engine/Core/EntityWrapper.cpp @@ -3,11 +3,6 @@ const EntityWrapper EntityWrapper::Invalid = EntityWrapper(nullptr, EntityID_Invalid); -bool EntityWrapper::operator==(const EntityWrapper& e) const -{ - return (this->World == e.World) && (this->ID == e.ID); -} - bool EntityWrapper::HasComponent(const std::string& componentName) { return World->HasComponent(ID, componentName); @@ -41,6 +36,16 @@ ComponentWrapper EntityWrapper::operator[](const char* componentName) } } +bool EntityWrapper::operator==(const EntityWrapper& e) const +{ + return (this->World == e.World) && (this->ID == e.ID); +} + +bool EntityWrapper::operator!=(const EntityWrapper& e) const +{ + return !this->operator==(e); +} + EntityWrapper::operator EntityID() const { return this->ID;