summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-07-31 09:11:44 -0400
committerLioncash <mathew1800@gmail.com>2019-07-31 09:54:53 -0400
commit255d2ff2d296307c562057c096a0d77c9c5e06b5 (patch)
treeac003c0c35f0defcc52ecc861846e43de39f4787 /Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
parenta07d19a2fd1e6a06db56649f4ae6233a358e80dd (diff)
DolphinQt/Config/GeckoCodeWidget: Deduplicate ini path
We can store this to a local variable to avoid duplicating the same string creation twice.
Diffstat (limited to 'Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp')
-rw-r--r--Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
index dda5915fc5..da015cf57b 100644
--- a/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
+++ b/Source/Core/DolphinQt/Config/GeckoCodeWidget.cpp
@@ -229,12 +229,13 @@ void GeckoCodeWidget::RemoveCode()
void GeckoCodeWidget::SaveCodes()
{
- IniFile game_ini_local;
- game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
+ const auto ini_path =
+ std::string(File::GetUserPath(D_GAMESETTINGS_IDX)).append(m_game_id).append(".ini");
+ IniFile game_ini_local;
+ game_ini_local.Load(ini_path);
Gecko::SaveCodes(game_ini_local, m_gecko_codes);
-
- game_ini_local.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
+ game_ini_local.Save(ini_path);
}
void GeckoCodeWidget::OnContextMenuRequested()