mirror of
https://github.com/zeldaret/botw
synced 2026-05-26 07:38:50 -04:00
ksys/gdt: Make ~Manager the key function to help with dtor matching
Make syncData a pure virtual function that is overridden in Manager to turn the destructor into the key function. Otherwise, the GOT would be used to load the vtable pointer until syncData is implemented, which is quite inconvenient.
This commit is contained in:
@@ -17,8 +17,8 @@ inline IManager::~IManager() = default;
|
||||
/// GameDataMgr communication.
|
||||
class ManagerCom {
|
||||
public:
|
||||
virtual const char* getName() const { return "GameData"; }
|
||||
virtual void syncData();
|
||||
virtual const char* getName() const = 0;
|
||||
virtual void syncData() = 0;
|
||||
|
||||
void* _8 = nullptr;
|
||||
void* _10 = nullptr;
|
||||
@@ -29,7 +29,9 @@ KSYS_CHECK_SIZE_NX150(ManagerCom, 0x18);
|
||||
class Manager : public IManager, public ManagerCom {
|
||||
SEAD_SINGLETON_DISPOSER(Manager)
|
||||
Manager();
|
||||
virtual ~Manager();
|
||||
~Manager() override;
|
||||
const char* getName() const override { return "GameData"; }
|
||||
void syncData() override;
|
||||
|
||||
public:
|
||||
sead::Heap* getGameDataHeap() const { return mGameDataHeap; }
|
||||
|
||||
Reference in New Issue
Block a user