figments: mainloop: warnings--

This commit is contained in:
Torrie Fischer 2023-12-20 09:09:33 +01:00
parent 90055a07e2
commit 214825c1d3

View File

@ -21,7 +21,7 @@ struct Scheduler {
struct iterator: public std::iterator<std::input_iterator_tag, Task*> {
Scheduler& queue;
int idx = 0;
size_t idx = 0;
explicit iterator(Scheduler& queue) : queue(queue), idx(nextEnabled(0)) {}
iterator(Scheduler& queue, int start) : queue(queue), idx(nextEnabled(start)) {}
iterator& operator++() {
@ -33,7 +33,7 @@ struct Scheduler {
}
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) {
return pos;
}