TimePlayedManager: Add some const

This commit is contained in:
Dentomologist 2025-03-15 13:38:54 -07:00
parent c8b3885f46
commit b929501af1
2 changed files with 6 additions and 5 deletions

View File

@ -282,7 +282,7 @@ void CPUManager::StepOpcode(Common::Event* event)
}
// Requires m_state_change_lock
bool CPUManager::SetStateLocked(State s)
bool CPUManager::SetStateLocked(const State s)
{
if (m_state == State::PowerDown)
return false;
@ -302,7 +302,7 @@ bool CPUManager::SetStateLocked(State s)
return true;
}
void CPUManager::SetStepping(bool stepping)
void CPUManager::SetStepping(const bool stepping)
{
std::lock_guard stepping_lock(m_stepping_lock);
std::unique_lock state_lock(m_state_change_lock);

View File

@ -28,9 +28,10 @@ TimePlayedManager& TimePlayedManager::GetInstance()
return time_played_manager;
}
void TimePlayedManager::AddTime(const std::string& game_id, std::chrono::milliseconds time_emulated)
void TimePlayedManager::AddTime(const std::string& game_id,
const std::chrono::milliseconds time_emulated)
{
std::string filtered_game_id = Common::EscapeFileName(game_id);
const std::string filtered_game_id = Common::EscapeFileName(game_id);
u64 previous_time;
u64 new_time;
@ -48,7 +49,7 @@ void TimePlayedManager::AddTime(const std::string& game_id, std::chrono::millise
std::chrono::milliseconds TimePlayedManager::GetTimePlayed(const std::string& game_id) const
{
std::string filtered_game_id = Common::EscapeFileName(game_id);
const std::string filtered_game_id = Common::EscapeFileName(game_id);
u64 previous_time;
std::lock_guard guard(m_mutex);