diff options
author | peterbell10 <peterbell10@live.co.uk> | 2020-05-15 00:15:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-15 00:15:35 +0200 |
commit | 13144a08e496b89b34093ffd3d810d3442df3c44 (patch) | |
tree | 406d79e17b69560564fdb0972a3c50542a3a96c6 /src/Bindings/PluginManager.cpp | |
parent | Generate "LuaState_Typedefs.inc" before running clang-tidy (diff) | |
download | cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.gz cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.bz2 cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.lz cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.xz cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.tar.zst cuberite-13144a08e496b89b34093ffd3d810d3442df3c44.zip |
Diffstat (limited to 'src/Bindings/PluginManager.cpp')
-rw-r--r-- | src/Bindings/PluginManager.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/Bindings/PluginManager.cpp b/src/Bindings/PluginManager.cpp index b57f3779f..88bc82172 100644 --- a/src/Bindings/PluginManager.cpp +++ b/src/Bindings/PluginManager.cpp @@ -57,7 +57,7 @@ void cPluginManager::RefreshPluginList(void) { // Get a list of currently available folders: AString PluginsPath = GetPluginsPath() + "/"; - AStringVector Contents = cFile::GetFolderContents(PluginsPath.c_str()); + AStringVector Contents = cFile::GetFolderContents(PluginsPath); AStringVector Folders; for (auto & item: Contents) { @@ -1401,7 +1401,7 @@ bool cPluginManager::BindCommand( auto & reg = m_Commands[a_Command]; reg.m_Plugin = a_Plugin; - reg.m_Handler = a_Handler; + reg.m_Handler = std::move(a_Handler); reg.m_Permission = a_Permission; reg.m_HelpString = a_HelpString; return true; @@ -1508,7 +1508,7 @@ bool cPluginManager::BindConsoleCommand( auto & reg = m_ConsoleCommands[a_Command]; reg.m_Plugin = a_Plugin; - reg.m_Handler = a_Handler; + reg.m_Handler = std::move(a_Handler); reg.m_Permission = ""; reg.m_HelpString = a_HelpString; return true; @@ -1739,7 +1739,7 @@ AStringVector cPluginManager::GetFoldersToLoad(cSettingsRepositoryInterface & a_ // Get the old format plugin list, and migrate it. // Upgrade path added on 2020-03-27 auto OldValues = a_Settings.GetValues("Plugins"); - for (auto NameValue : OldValues) + for (const auto & NameValue : OldValues) { AString ValueName = NameValue.first; if (ValueName.compare("Plugin") == 0) @@ -1759,7 +1759,7 @@ AStringVector cPluginManager::GetFoldersToLoad(cSettingsRepositoryInterface & a_ // Get the list of plugins to load: auto Values = a_Settings.GetValues("Plugins"); - for (auto NameValue : Values) + for (const auto & NameValue : Values) { AString Enabled = NameValue.second; if (Enabled == "1") |