diff options
| author | Léo Lam <leo@leolam.fr> | 2020-11-03 18:54:52 +0100 |
|---|---|---|
| committer | Léo Lam <leo@leolam.fr> | 2020-11-03 18:57:52 +0100 |
| commit | c9998d3abfb75e64b92ece68fb6f9ffc696ed1b2 (patch) | |
| tree | fe6a5b1117352560f455bbe846edd305249b975c /src | |
| parent | 835e11cb16905141d4fb4c8ac6f5f401f642ed4a (diff) | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/KingSystem/GameData/gdtManager.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/KingSystem/GameData/gdtManager.h b/src/KingSystem/GameData/gdtManager.h index b691eff3..b723f3dc 100644 --- a/src/KingSystem/GameData/gdtManager.h +++ b/src/KingSystem/GameData/gdtManager.h @@ -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; } |
