From e93f649bfb0110fb29d7cc399133389ec782ba2d Mon Sep 17 00:00:00 2001 From: tildearrow Date: Thu, 13 Jul 2023 04:23:01 -0500 Subject: [PATCH] FixedQueue, part 3 --- src/engine/fixedQueue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/fixedQueue.h b/src/engine/fixedQueue.h index afcf8afc..ad43f160 100644 --- a/src/engine/fixedQueue.h +++ b/src/engine/fixedQueue.h @@ -112,12 +112,12 @@ template bool FixedQueue::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; }