Add const ref, remove excess .c_str(), push_* -> emplace_* and rewrite constructors

This commit is contained in:
germanaizek authored and Hielke Morsink committed 2022-05-07 16:05:38 +02:00
1 parent cdc1a912d3
commit 0045aed7f9
14 files changed
+18 -19

No files matched your search

+2 -2
View File
@@ -457,7 +457,7 @@ void ScriptEngine::RefreshPlugins()
{
if (plugin->HasPath())
{
plugins.push_back(std::string(plugin->GetPath()));
plugins.emplace_back(plugin->GetPath());
}
}
@@ -580,7 +580,7 @@ void ScriptEngine::StopUnloadRegisterAllPlugins()
std::vector<std::string> pluginPaths;
for (auto& plugin : _plugins)
{
pluginPaths.push_back(std::string(plugin->GetPath()));
pluginPaths.emplace_back(plugin->GetPath());
StopPlugin(plugin);
}
for (auto& plugin : _plugins)