From 2f7da91a738cbecfb5107735f287e40d6198e67f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 28 Dec 2023 21:51:31 +0100 Subject: [PATCH] fix: Remove unused `update` parameter --- plugins/builtin/include/content/views/view_store.hpp | 2 +- plugins/builtin/source/content/views/view_store.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/builtin/include/content/views/view_store.hpp b/plugins/builtin/include/content/views/view_store.hpp index bec995afa..2c88493d2 100644 --- a/plugins/builtin/include/content/views/view_store.hpp +++ b/plugins/builtin/include/content/views/view_store.hpp @@ -68,7 +68,7 @@ namespace hex::plugin::builtin { void addCategory(const UnlocalizedString &unlocalizedName, const std::string &requestName, fs::ImHexPath path, std::function downloadCallback = []{}); - bool download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url, bool update); + bool download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url); bool remove(fs::ImHexPath pathType, const std::string &fileName); private: diff --git a/plugins/builtin/source/content/views/view_store.cpp b/plugins/builtin/source/content/views/view_store.cpp index d2745930a..935637388 100644 --- a/plugins/builtin/source/content/views/view_store.cpp +++ b/plugins/builtin/source/content/views/view_store.cpp @@ -129,7 +129,7 @@ namespace hex::plugin::builtin { if (entry.hasUpdate) { if (ImGui::Button("hex.builtin.view.store.update"_lang, buttonSize)) { - entry.downloading = this->download(category.path, entry.fileName, entry.link, !entry.system); + entry.downloading = this->download(category.path, entry.fileName, entry.link); } } else if (entry.system) { ImGui::BeginDisabled(); @@ -142,7 +142,7 @@ namespace hex::plugin::builtin { } } else if (!entry.installed) { if (ImGui::Button("hex.builtin.view.store.download"_lang, buttonSize)) { - entry.downloading = this->download(category.path, entry.fileName, entry.link, false); + entry.downloading = this->download(category.path, entry.fileName, entry.link); AchievementManager::unlockAchievement("hex.builtin.achievement.misc", "hex.builtin.achievement.misc.download_from_store.name"); } } else { @@ -202,7 +202,7 @@ namespace hex::plugin::builtin { for (auto &category : m_categories) { for (auto &entry : category.entries) { if (entry.hasUpdate) { - entry.downloading = this->download(category.path, entry.fileName, entry.link, true); + entry.downloading = this->download(category.path, entry.fileName, entry.link); if (!m_download.valid()) continue; @@ -293,7 +293,7 @@ namespace hex::plugin::builtin { this->drawStore(); } - bool ViewStore::download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url, bool update) { + bool ViewStore::download(fs::ImHexPath pathType, const std::string &fileName, const std::string &url) { bool downloading = false; for (const auto &folderPath : fs::getDefaultPaths(pathType)) { if (!fs::isPathWritable(folderPath))