mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-25 04:11:42 -04:00
this is android32 only
This commit is contained in:
parent
9c87d4c8dd
commit
f68b25a052
1 changed files with 11 additions and 2 deletions
|
@ -2,11 +2,20 @@
|
|||
|
||||
using namespace geode::prelude;
|
||||
|
||||
#ifdef GEODE_IS_ANDROID
|
||||
#ifdef GEODE_IS_ANDROID32
|
||||
|
||||
// replaces https://github.com/llvm-mirror/libcxxabi/blob/master/src/private_typeinfo.cpp#L213
|
||||
// this is the function that checks if a type can catch an exception
|
||||
bool canCatchImpl(const std::type_info* self, const std::type_info* thrown, void*& adjustedPtr) {
|
||||
bool canCatchImpl(const std::type_info* self, const std::type_info* thrown, void*& adjustedPtr) {
|
||||
// cause who is gonna use foreign exceptions anyway
|
||||
#if 0
|
||||
if (std::strcmp(self->name(), typeid(std::exception).name()) == 0) {
|
||||
return true;
|
||||
}
|
||||
if (adjustedPtr == nullptr) {
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
auto vtable = reinterpret_cast<geode::cast::VtableType*>(*(intptr_t*)adjustedPtr);
|
||||
auto complete = static_cast<geode::cast::CompleteVtableType*>(vtable);
|
||||
auto typeinfo = complete->m_typeinfo;
|
||||
|
|
Loading…
Add table
Reference in a new issue