mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 07:27:45 +00:00
Everywhere: Rename get in ConfigFile::get_for_{lib,app,system} to open
This patch brings the ConfigFile helpers for opening lib, app and system configs more inline with the regular ConfigFile::open functions.
This commit is contained in:
parent
938051feb8
commit
acde7d12b0
37 changed files with 51 additions and 51 deletions
|
@ -23,7 +23,7 @@ SnakeGame::SnakeGame()
|
|||
srand(time(nullptr));
|
||||
reset();
|
||||
|
||||
auto config = Core::ConfigFile::get_for_app("Snake");
|
||||
auto config = Core::ConfigFile::open_for_app("Snake");
|
||||
m_high_score = config->read_num_entry("Snake", "HighScore", 0);
|
||||
m_high_score_text = String::formatted("Best: {}", m_high_score);
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ void SnakeGame::timer_event(Core::TimerEvent&)
|
|||
m_high_score = m_score;
|
||||
m_high_score_text = String::formatted("Best: {}", m_high_score);
|
||||
update(high_score_rect());
|
||||
auto config = Core::ConfigFile::get_for_app("Snake", Core::ConfigFile::AllowWriting::Yes);
|
||||
auto config = Core::ConfigFile::open_for_app("Snake", Core::ConfigFile::AllowWriting::Yes);
|
||||
config->write_num_entry("Snake", "HighScore", m_high_score);
|
||||
}
|
||||
update(score_rect());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue