diff options
| author | 2018-08-02 11:55:10 -0400 | |
|---|---|---|
| committer | 2018-08-02 11:56:11 -0400 | |
| commit | fac0e42b2feece80258b42d8e9f80f5bbd08e4b3 (patch) | |
| tree | a46b7ab315cc86fa9ff6e8dd7f79f2f7a1bd00fd /src | |
| parent | kernel/thread: Make GetFreeThreadLocalSlot() internally linked (diff) | |
| download | yuzu-fac0e42b2feece80258b42d8e9f80f5bbd08e4b3.tar.gz yuzu-fac0e42b2feece80258b42d8e9f80f5bbd08e4b3.tar.xz yuzu-fac0e42b2feece80258b42d8e9f80f5bbd08e4b3.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index e28e620d5..02bdca802 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -252,7 +252,8 @@ void Thread::ResumeFromWait() { | |||
| 252 | * slot: The index of the first free slot in the indicated page. | 252 | * slot: The index of the first free slot in the indicated page. |
| 253 | * alloc_needed: Whether there's a need to allocate a new TLS page (All pages are full). | 253 | * alloc_needed: Whether there's a need to allocate a new TLS page (All pages are full). |
| 254 | */ | 254 | */ |
| 255 | static std::tuple<u32, u32, bool> GetFreeThreadLocalSlot(std::vector<std::bitset<8>>& tls_slots) { | 255 | static std::tuple<u32, u32, bool> GetFreeThreadLocalSlot( |
| 256 | const std::vector<std::bitset<8>>& tls_slots) { | ||
| 256 | // Iterate over all the allocated pages, and try to find one where not all slots are used. | 257 | // Iterate over all the allocated pages, and try to find one where not all slots are used. |
| 257 | for (unsigned page = 0; page < tls_slots.size(); ++page) { | 258 | for (unsigned page = 0; page < tls_slots.size(); ++page) { |
| 258 | const auto& page_tls_slots = tls_slots[page]; | 259 | const auto& page_tls_slots = tls_slots[page]; |