mirror of
https://github.com/geode-sdk/geode.git
synced 2025-04-10 12:04:36 -04:00
move definition of ~HandleToSaved after Mod
This commit is contained in:
parent
1277ac746f
commit
1d34bb138b
1 changed files with 6 additions and 3 deletions
|
@ -220,9 +220,7 @@ namespace geode {
|
|||
m_mod(mod) {}
|
||||
HandleToSaved(HandleToSaved const&) = delete;
|
||||
HandleToSaved(HandleToSaved&&) = delete;
|
||||
~HandleToSaved() {
|
||||
m_mod->setSavedValue(m_key, static_cast<T>(*this));
|
||||
}
|
||||
~HandleToSaved();
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -632,6 +630,11 @@ namespace geode {
|
|||
const char* expandSpriteName(const char* name);
|
||||
};
|
||||
|
||||
template<class T>
|
||||
HandleToSaved<T>::~HandleToSaved() {
|
||||
m_mod->setSavedValue(m_key, static_cast<T>(*this));
|
||||
}
|
||||
|
||||
/**
|
||||
* To bypass the need for cyclic dependencies,
|
||||
* this function does the exact same as Mod::get()
|
||||
|
|
Loading…
Add table
Reference in a new issue