make deleteSaveData in Mod::uninstall an optional param

This commit is contained in:
ConfiG 2024-01-13 01:02:23 +03:00
parent d9ff838c80
commit 83f7a0b18c
No known key found for this signature in database
GPG key ID: 44DA1983F524C11B
3 changed files with 2 additions and 12 deletions

View file

@ -313,20 +313,13 @@ namespace geode {
*/
Result<> disable();
// TODO: in 2.0.0 make this use an optional arg instead
/**
* Delete the mod's .geode package.
* @returns Successful result on success,
* errorful result with info on error
*/
Result<> uninstall();
/**
* Delete the mod's .geode package.
* @param deleteSaveData Whether should also delete the mod's save data
* @returns Successful result on success,
* errorful result with info on error
*/
Result<> uninstall(bool deleteSaveData);
Result<> uninstall(bool deleteSaveData = false);
bool isUninstalled() const;
ModRequestedAction getRequestedAction() const;

View file

@ -157,9 +157,6 @@ Result<> Mod::disable() {
return m_impl->disable();
}
Result<> Mod::uninstall() {
return m_impl->uninstall(false);
}
Result<> Mod::uninstall(bool deleteSaveData) {
return m_impl->uninstall(deleteSaveData);
}

View file

@ -123,7 +123,7 @@ namespace geode {
Result<> unpatch(Patch* patch);
Result<> enable();
Result<> disable();
Result<> uninstall(bool deleteSaveData);
Result<> uninstall(bool deleteSaveData = false);
bool isUninstalled() const;
// 1.3.0 additions