FixedQueue: and again

This commit is contained in:
tildearrow 2023-09-14 02:41:11 -05:00
parent 2f9d1d3eef
commit d69cdedd4a

View file

@ -76,7 +76,7 @@ template <typename T, size_t items> bool FixedQueue<T,items>::erase(size_t pos)
return pop_back();
}
for (size_t i=pos, p=(readPos+pos)%items, p1=(readPos+pos+1)%items; i<=curSize; i++) {
for (size_t i=pos+1, p=(readPos+pos)%items, p1=(readPos+pos+1)%items; i<curSize; i++) {
if (p>=items) p-=items;
if (p1>=items) p1-=items;
data[p]=data[p1];