diff --git a/spine-cpp/spine-cpp/src/spine/RTTI.cpp b/spine-cpp/spine-cpp/src/spine/RTTI.cpp index 99c768dca..e7fec06bb 100644 --- a/spine-cpp/spine-cpp/src/spine/RTTI.cpp +++ b/spine-cpp/spine-cpp/src/spine/RTTI.cpp @@ -48,14 +48,14 @@ const std::string &RTTI::getClassName() const { } bool RTTI::isExactly(const RTTI &rtti) const { - return (this == &rtti); + return (this->_className == rtti._className); } bool RTTI::instanceOf(const RTTI &rtti) const { const RTTI *pCompare = this; while (pCompare) { - if (pCompare == &rtti) { + if (pCompare->_className == rtti._className) { return true; } @@ -63,4 +63,4 @@ bool RTTI::instanceOf(const RTTI &rtti) const { } return false; -} +} \ No newline at end of file