figments: mainloop: warnings--
This commit is contained in:
parent
90055a07e2
commit
214825c1d3
@ -21,7 +21,7 @@ struct Scheduler {
|
|||||||
|
|
||||||
struct iterator: public std::iterator<std::input_iterator_tag, Task*> {
|
struct iterator: public std::iterator<std::input_iterator_tag, Task*> {
|
||||||
Scheduler& queue;
|
Scheduler& queue;
|
||||||
int idx = 0;
|
size_t idx = 0;
|
||||||
explicit iterator(Scheduler& queue) : queue(queue), idx(nextEnabled(0)) {}
|
explicit iterator(Scheduler& queue) : queue(queue), idx(nextEnabled(0)) {}
|
||||||
iterator(Scheduler& queue, int start) : queue(queue), idx(nextEnabled(start)) {}
|
iterator(Scheduler& queue, int start) : queue(queue), idx(nextEnabled(start)) {}
|
||||||
iterator& operator++() {
|
iterator& operator++() {
|
||||||
@ -33,7 +33,7 @@ struct Scheduler {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int nextEnabled(int start) const {
|
int nextEnabled(int start) const {
|
||||||
for(int pos = start; pos < queue.tasks.size();pos++) {
|
for(size_t pos = start; pos < queue.tasks.size();pos++) {
|
||||||
if (queue.tasks[pos]->state == Task::Running) {
|
if (queue.tasks[pos]->state == Task::Running) {
|
||||||
return pos;
|
return pos;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user