[ue4] Our RTTI implementation compared tags by address. That doesn't work for UE4 hot reloading, as on reload of a shared library, the new tags have an address != the tags of the old shared library. We use string comparison now, which is more robust.

This commit is contained in:
badlogic 2018-09-25 13:18:13 +02:00
parent 0e6673c370
commit f534058fef

View File

@ -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;
}
}