FixedQueue, part 3

This commit is contained in:
tildearrow 2023-07-13 04:23:01 -05:00
parent 708c363635
commit e93f649bfb
1 changed files with 1 additions and 1 deletions

View File

@ -112,12 +112,12 @@ template <typename T, size_t items> bool FixedQueue<T,items>::push_front(const T
logW("stack overflow!");
return false;
}
data[readPos]=item;
if (readPos>0) {
readPos--;
} else {
readPos=items-1;
}
data[readPos]=item;
return true;
}