diff --git a/plugins/builtin/source/content/providers.cpp b/plugins/builtin/source/content/providers.cpp index e62c24d16..9fc3daed2 100644 --- a/plugins/builtin/source/content/providers.cpp +++ b/plugins/builtin/source/content/providers.cpp @@ -47,7 +47,7 @@ namespace hex::plugin::builtin { auto providerSettings = nlohmann::json::parse(tar.readString(basePath / hex::format("{}.json", id))); auto providerType = providerSettings.at("type").get(); - auto provider = ImHexApi::Provider::createProvider(providerType, true, false); + auto newProvider = ImHexApi::Provider::createProvider(providerType, true, false); ON_SCOPE_EXIT { if (!success) { for (auto &task : TaskManager::getRunningTasks()) @@ -60,7 +60,7 @@ namespace hex::plugin::builtin { } }; - if (provider == nullptr) { + if (newProvider == nullptr) { // If a provider is not created, it will be overwritten when saving the project, // so we should prevent the project from loading at all showError(hex::format("hex.builtin.popup.error.project.load"_lang, @@ -70,19 +70,19 @@ namespace hex::plugin::builtin { break; } - provider->setID(id); + newProvider->setID(id); bool loaded = false; try { - provider->loadSettings(providerSettings.at("settings")); + newProvider->loadSettings(providerSettings.at("settings")); loaded = true; } catch (const std::exception &e){ - providerWarnings[provider] = e.what(); + providerWarnings[newProvider] = e.what(); } if (loaded) { - if (!provider->open() || !provider->isAvailable() || !provider->isReadable()) { - providerWarnings[provider] = provider->getErrorMessage(); + if (!newProvider->open() || !newProvider->isAvailable() || !newProvider->isReadable()) { + providerWarnings[newProvider] = newProvider->getErrorMessage(); } else - EventManager::post(provider); + EventManager::post(newProvider); } } diff --git a/plugins/builtin/source/content/settings_entries.cpp b/plugins/builtin/source/content/settings_entries.cpp index 7209b5723..a38eb6190 100644 --- a/plugins/builtin/source/content/settings_entries.cpp +++ b/plugins/builtin/source/content/settings_entries.cpp @@ -255,8 +255,8 @@ namespace hex::plugin::builtin { this->m_editing = false; ShortcutManager::resumeShortcuts(); - if (!this->m_hasDuplicate) { settingChanged = true; + if (!this->m_hasDuplicate) { } } }