From 893d9c5ff3eb1f368539fc73cb2be94c4e101975 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Thu, 2 Aug 2018 11:55:10 -0400 Subject: [PATCH] kernel/thread: Make GetFreeThreadLocalSlot() reference parameter a const reference This function only reads the data being referenced, it doesn't modify it, so we can turn the reference into a const reference. --- src/core/hle/kernel/thread.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 6e84362f5..9b6598115 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp @@ -286,7 +286,8 @@ static void DebugThreadQueue() { * slot: The index of the first free slot in the indicated page. * alloc_needed: Whether there's a need to allocate a new TLS page (All pages are full). */ -static std::tuple GetFreeThreadLocalSlot(std::vector>& tls_slots) { +static std::tuple GetFreeThreadLocalSlot( + const std::vector>& tls_slots) { // Iterate over all the allocated pages, and try to find one where not all slots are used. for (unsigned page = 0; page < tls_slots.size(); ++page) { const auto& page_tls_slots = tls_slots[page];