mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-03-19 03:42:36 +00:00
TimePlayedManager: Add some const
This commit is contained in:
parent
c8b3885f46
commit
b929501af1
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user