diff options
| author | Pierre Bourdon <delroth@gmail.com> | 2019-12-30 10:59:14 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-12-30 10:59:14 +0100 |
| commit | 7a6a4510f6eed48652200f8c83e79723ae3581f2 (patch) | |
| tree | 6abb193c5bb8ef35b627d023648b18a11a16eddc /Source/Core/InputCommon/InputConfig.cpp | |
| parent | 084344aa5d9a39fc05cfe952005e530766c3c29c (diff) | |
| parent | 11339d77c6835dd908b86a92412686c46435e006 (diff) | |
Merge pull request #8362 from GerbilSoft/feature/string-optimizations.2019-09-11
Various string and other optimizations
Diffstat (limited to 'Source/Core/InputCommon/InputConfig.cpp')
| -rw-r--r-- | Source/Core/InputCommon/InputConfig.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/InputCommon/InputConfig.cpp b/Source/Core/InputCommon/InputConfig.cpp index a1826f46d1..24330575e1 100644 --- a/Source/Core/InputCommon/InputConfig.cpp +++ b/Source/Core/InputCommon/InputConfig.cpp @@ -30,7 +30,7 @@ bool InputConfig::LoadConfig(bool isGC) { IniFile inifile; bool useProfile[MAX_BBMOTES] = {false, false, false, false, false}; - std::string num[MAX_BBMOTES] = {"1", "2", "3", "4", "BB"}; + static constexpr std::array<std::string_view, MAX_BBMOTES> num = {"1", "2", "3", "4", "BB"}; std::string profile[MAX_BBMOTES]; std::string path; @@ -58,10 +58,10 @@ bool InputConfig::LoadConfig(bool isGC) for (int i = 0; i < 4; i++) { - if (control_section->Exists(type + "Profile" + num[i])) + if (control_section->Exists(type + "Profile" + std::string(num[i]))) { std::string profile_setting; - if (control_section->Get(type + "Profile" + num[i], &profile_setting)) + if (control_section->Get(type + "Profile" + std::string(num[i]), &profile_setting)) { auto profiles = InputProfile::GetProfilesFromSetting( profile_setting, File::GetUserPath(D_CONFIG_IDX) + path); |
