From 7320c667dfa8993f4ebec8d6adfbf954d0591784 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 5 Feb 2019 15:57:26 -0500 Subject: [PATCH] service/nvflinger: Mark FindVsyncEvent() as a const member function This member function doesn't actually modify instance state, so it can be marked as a const member function. --- src/core/hle/service/nvflinger/nvflinger.cpp | 2 +- src/core/hle/service/nvflinger/nvflinger.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/hle/service/nvflinger/nvflinger.cpp b/src/core/hle/service/nvflinger/nvflinger.cpp index e15080b3b..ce3f2d8c1 100644 --- a/src/core/hle/service/nvflinger/nvflinger.cpp +++ b/src/core/hle/service/nvflinger/nvflinger.cpp @@ -78,7 +78,7 @@ u32 NVFlinger::FindBufferQueueId(u64 display_id, u64 layer_id) const { return layer.buffer_queue->GetId(); } -Kernel::SharedPtr NVFlinger::FindVsyncEvent(u64 display_id) { +Kernel::SharedPtr NVFlinger::FindVsyncEvent(u64 display_id) const { return FindDisplay(display_id).vsync_event.readable; } diff --git a/src/core/hle/service/nvflinger/nvflinger.h b/src/core/hle/service/nvflinger/nvflinger.h index 984be68a7..61db2c23b 100644 --- a/src/core/hle/service/nvflinger/nvflinger.h +++ b/src/core/hle/service/nvflinger/nvflinger.h @@ -67,7 +67,7 @@ public: u32 FindBufferQueueId(u64 display_id, u64 layer_id) const; /// Gets the vsync event for the specified display. - Kernel::SharedPtr FindVsyncEvent(u64 display_id); + Kernel::SharedPtr FindVsyncEvent(u64 display_id) const; /// Obtains a buffer queue identified by the ID. std::shared_ptr FindBufferQueue(u32 id) const;