mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-03-26 22:49:01 +08:00
[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:
parent
0e6673c370
commit
f534058fef
@ -48,14 +48,14 @@ const std::string &RTTI::getClassName() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool RTTI::isExactly(const RTTI &rtti) const {
|
bool RTTI::isExactly(const RTTI &rtti) const {
|
||||||
return (this == &rtti);
|
return (this->_className == rtti._className);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool RTTI::instanceOf(const RTTI &rtti) const {
|
bool RTTI::instanceOf(const RTTI &rtti) const {
|
||||||
const RTTI *pCompare = this;
|
const RTTI *pCompare = this;
|
||||||
|
|
||||||
while (pCompare) {
|
while (pCompare) {
|
||||||
if (pCompare == &rtti) {
|
if (pCompare->_className == rtti._className) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -63,4 +63,4 @@ bool RTTI::instanceOf(const RTTI &rtti) const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user