mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-08 09:09:04 +00:00
AchievementManager: Make GetInstance() return a reference
The internal static member will always have a valid lifetime. Makes this consistent with other instance based objects in our code.
This commit is contained in:
parent
d84ed054ee
commit
e55f9ed102
21 changed files with 81 additions and 74 deletions
|
@ -37,7 +37,7 @@ AchievementLeaderboardWidget::AchievementLeaderboardWidget(QWidget* parent) : QW
|
|||
m_common_layout = new QGridLayout();
|
||||
|
||||
{
|
||||
std::lock_guard lg{*AchievementManager::GetInstance()->GetLock()};
|
||||
std::lock_guard lg{*AchievementManager::GetInstance().GetLock()};
|
||||
UpdateData();
|
||||
}
|
||||
|
||||
|
@ -54,9 +54,9 @@ void AchievementLeaderboardWidget::UpdateData()
|
|||
{
|
||||
ClearLayoutRecursively(m_common_layout);
|
||||
|
||||
if (!AchievementManager::GetInstance()->IsGameLoaded())
|
||||
if (!AchievementManager::GetInstance().IsGameLoaded())
|
||||
return;
|
||||
const auto& leaderboards = AchievementManager::GetInstance()->GetLeaderboardsInfo();
|
||||
const auto& leaderboards = AchievementManager::GetInstance().GetLeaderboardsInfo();
|
||||
int row = 0;
|
||||
for (const auto& board_row : leaderboards)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue