From d1947f715ca5d4e5949a80bd389e1d2c4cbd2fd9 Mon Sep 17 00:00:00 2001 From: LC Date: Mon, 27 Jul 2026 14:00:04 -0400 Subject: [PATCH] Config: Move strings in constructor where applicable Same thing, just a little less memory churn. --- Source/Common/Config.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Common/Config.cpp b/Source/Common/Config.cpp index 45cbe449d..f61399b08 100644 --- a/Source/Common/Config.cpp +++ b/Source/Common/Config.cpp @@ -242,12 +242,12 @@ void OptionMapper::MapNameToOption(const char* ConfigName, const char* ConfigStr MainLoader::MainLoader(FEXCore::Config::LayerType Type, std::optional AppName) : OptionMapper(Type) - , AppName {AppName} + , AppName {std::move(AppName)} , Config {FEXCore::Config::GetConfigFileLocation(Type == FEXCore::Config::LayerType::LAYER_GLOBAL_MAIN)} {} MainLoader::MainLoader(fextl::string ConfigFile, std::optional AppName) : OptionMapper(FEXCore::Config::LayerType::LAYER_MAIN) - , AppName {AppName} + , AppName {std::move(AppName)} , Config {std::move(ConfigFile)} {} @@ -257,7 +257,7 @@ MainLoader::MainLoader(FEXCore::Config::LayerType Type, std::string_view ConfigF MainLoader::MainLoader(FEXCore::Config::LayerType Type, std::string_view ConfigFile, std::optional AppName) : OptionMapper(Type) - , AppName {AppName} + , AppName {std::move(AppName)} , Config {ConfigFile} {} void MainLoader::Load() {