Skip to content
Permalink
Browse files

DolphinQt/Config/GeckoCodeWidget: Deduplicate ini path

We can store this to a local variable to avoid duplicating the same
string creation twice.
  • Loading branch information...
lioncash committed Jul 31, 2019
1 parent a07d19a commit 255d2ff2d296307c562057c096a0d77c9c5e06b5
Showing with 5 additions and 4 deletions.
  1. +5 −4 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()

0 comments on commit 255d2ff

Please sign in to comment.
You can’t perform that action at this time.