From 17ac06f83ac4aeb39303a8970f6715517dc471f4 Mon Sep 17 00:00:00 2001 From: Don HO Date: Mon, 12 Nov 2018 03:37:42 +0100 Subject: [PATCH] Fix a regression of fail removing different architecture plugins --- PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp | 9 ++++----- PowerEditor/src/MISC/PluginsManager/PluginsManager.h | 2 +- PowerEditor/src/NppCommands.cpp | 3 +-- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp index eb8a0b03..04150356 100644 --- a/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp +++ b/PowerEditor/src/MISC/PluginsManager/PluginsManager.cpp @@ -114,7 +114,7 @@ cleanup: // release all of our handles return machine_type; } -int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector & dll2Remove) +int PluginsManager::loadPlugin(const TCHAR *pluginFilePath) { const TCHAR *pluginFileName = ::PathFindFileName(pluginFilePath); if (isInLoadedDlls(pluginFileName)) @@ -269,7 +269,7 @@ int PluginsManager::loadPlugin(const TCHAR *pluginFilePath, vector dllNames; - vector dll2Remove; NppParameters * nppParams = NppParameters::getInstance(); generic_string nppPath = nppParams->getNppPath(); @@ -363,7 +362,7 @@ bool PluginsManager::loadPluginsV2(const TCHAR* dir) for (size_t i = 0, len = dllNames.size(); i < len; ++i) { - loadPlugin(dllNames[i].c_str(), dll2Remove); + loadPlugin(dllNames[i].c_str()); } return true; diff --git a/PowerEditor/src/MISC/PluginsManager/PluginsManager.h b/PowerEditor/src/MISC/PluginsManager/PluginsManager.h index db5a03e3..921aa3e4 100644 --- a/PowerEditor/src/MISC/PluginsManager/PluginsManager.h +++ b/PowerEditor/src/MISC/PluginsManager/PluginsManager.h @@ -99,7 +99,7 @@ public: _nppData = nppData; } - int loadPlugin(const TCHAR *pluginFilePath, std::vector & dll2Remove); + int loadPlugin(const TCHAR *pluginFilePath); bool loadPluginsV2(const TCHAR *dir = NULL); bool unloadPlugin(int index, HWND nppHandle); diff --git a/PowerEditor/src/NppCommands.cpp b/PowerEditor/src/NppCommands.cpp index af01f447..f3cec6c1 100644 --- a/PowerEditor/src/NppCommands.cpp +++ b/PowerEditor/src/NppCommands.cpp @@ -2437,10 +2437,9 @@ void Notepad_plus::command(int id) vector copiedFiles = addNppComponents(destDir, extFilterName, extFilter); // load plugin - vector dll2Remove; for (size_t i = 0, len = copiedFiles.size() ; i < len ; ++i) { - int index = _pluginsManager.loadPlugin(copiedFiles[i].c_str(), dll2Remove); + int index = _pluginsManager.loadPlugin(copiedFiles[i].c_str()); if (_pluginsManager.getMenuHandle()) _pluginsManager.addInMenuFromPMIndex(index); }