From 83f7a0b18cf7ca71787884d3c65593581b802483 Mon Sep 17 00:00:00 2001 From: ConfiG Date: Sat, 13 Jan 2024 01:02:23 +0300 Subject: [PATCH] make deleteSaveData in Mod::uninstall an optional param --- loader/include/Geode/loader/Mod.hpp | 9 +-------- loader/src/loader/Mod.cpp | 3 --- loader/src/loader/ModImpl.hpp | 2 +- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/loader/include/Geode/loader/Mod.hpp b/loader/include/Geode/loader/Mod.hpp index b5b37a86..a87b1f67 100644 --- a/loader/include/Geode/loader/Mod.hpp +++ b/loader/include/Geode/loader/Mod.hpp @@ -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; diff --git a/loader/src/loader/Mod.cpp b/loader/src/loader/Mod.cpp index 4f8d7640..c202555e 100644 --- a/loader/src/loader/Mod.cpp +++ b/loader/src/loader/Mod.cpp @@ -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); } diff --git a/loader/src/loader/ModImpl.hpp b/loader/src/loader/ModImpl.hpp index 2a9bf68e..e6a411d3 100644 --- a/loader/src/loader/ModImpl.hpp +++ b/loader/src/loader/ModImpl.hpp @@ -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