From 7a329ae56cb481891caeef08304756db8d903564 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Mon, 28 Nov 2022 16:08:18 -0500 Subject: syncpoint_manager: Mark IsSyncpointAllocated() as const This doesn't modify class state at all. --- src/core/hle/service/nvdrv/core/syncpoint_manager.cpp | 4 ++-- src/core/hle/service/nvdrv/core/syncpoint_manager.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp index 8d14116d5..aba51d280 100644 --- a/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp +++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.cpp @@ -63,7 +63,7 @@ void SyncpointManager::FreeSyncpoint(u32 id) { syncpoint.reserved = false; } -bool SyncpointManager::IsSyncpointAllocated(u32 id) { +bool SyncpointManager::IsSyncpointAllocated(u32 id) const { return (id <= SyncpointCount) && syncpoints[id].reserved; } @@ -72,7 +72,7 @@ bool SyncpointManager::HasSyncpointExpired(u32 id, u32 threshold) const { if (!syncpoint.reserved) { ASSERT(false); - return 0; + return false; } // If the interface manages counters then we don't keep track of the maximum value as it handles diff --git a/src/core/hle/service/nvdrv/core/syncpoint_manager.h b/src/core/hle/service/nvdrv/core/syncpoint_manager.h index b76ef9032..4f2cefae5 100644 --- a/src/core/hle/service/nvdrv/core/syncpoint_manager.h +++ b/src/core/hle/service/nvdrv/core/syncpoint_manager.h @@ -44,7 +44,7 @@ public: /** * @brief Checks if the given syncpoint is both allocated and below the number of HW syncpoints */ - bool IsSyncpointAllocated(u32 id); + bool IsSyncpointAllocated(u32 id) const; /** * @brief Finds a free syncpoint and reserves it -- cgit v1.2.3