summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-12 12:52:25 -0400
committerGravatar Lioncash2018-08-12 12:54:14 -0400
commit11470f331a8ff51f5e927fa269fd381b2d4262cb (patch)
tree6dc2b3fe6771cc7abf452d3a595bb48310bea1ec /src
parentthread_queue_list: Convert typedef to a type alias (diff)
downloadyuzu-11470f331a8ff51f5e927fa269fd381b2d4262cb.tar.gz
yuzu-11470f331a8ff51f5e927fa269fd381b2d4262cb.tar.xz
yuzu-11470f331a8ff51f5e927fa269fd381b2d4262cb.zip
thread_queue_list: Make contains() and get_first() const member functions
These don't directly modify the contained data.
Diffstat (limited to 'src')
-rw-r--r--src/common/thread_queue_list.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/thread_queue_list.h b/src/common/thread_queue_list.h
index 258c5f17a..133122c5f 100644
--- a/src/common/thread_queue_list.h
+++ b/src/common/thread_queue_list.h
@@ -26,9 +26,9 @@ struct ThreadQueueList {
26 } 26 }
27 27
28 // Only for debugging, returns priority level. 28 // Only for debugging, returns priority level.
29 Priority contains(const T& uid) { 29 Priority contains(const T& uid) const {
30 for (Priority i = 0; i < NUM_QUEUES; ++i) { 30 for (Priority i = 0; i < NUM_QUEUES; ++i) {
31 Queue& cur = queues[i]; 31 const Queue& cur = queues[i];
32 if (std::find(cur.data.cbegin(), cur.data.cend(), uid) != cur.data.cend()) { 32 if (std::find(cur.data.cbegin(), cur.data.cend(), uid) != cur.data.cend()) {
33 return i; 33 return i;
34 } 34 }
@@ -37,8 +37,8 @@ struct ThreadQueueList {
37 return -1; 37 return -1;
38 } 38 }
39 39
40 T get_first() { 40 T get_first() const {
41 Queue* cur = first; 41 const Queue* cur = first;
42 while (cur != nullptr) { 42 while (cur != nullptr) {
43 if (!cur->data.empty()) { 43 if (!cur->data.empty()) {
44 return cur->data.front(); 44 return cur->data.front();