Config: Move strings in constructor where applicable

Same thing, just a little less memory churn.
This commit is contained in:
LC committed 2026-07-27 14:00:06 -04:00
1 parent 3f7971b7d2
commit d1947f715c
1 file changed
+3 -3
+3 -3
View File
@@ -242,12 +242,12 @@ void OptionMapper::MapNameToOption(const char* ConfigName, const char* ConfigStr
MainLoader::MainLoader(FEXCore::Config::LayerType Type, std::optional<fextl::string> 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<fextl::string> 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<fextl::string> AppName)
: OptionMapper(Type)
, AppName {AppName}
, AppName {std::move(AppName)}
, Config {ConfigFile} {}
void MainLoader::Load() {