diff --git a/include/spdlog/details/circular_q.h b/include/spdlog/details/circular_q.h index f06cd8e5..a37b7770 100644 --- a/include/spdlog/details/circular_q.h +++ b/include/spdlog/details/circular_q.h @@ -77,11 +77,11 @@ public: { if (tail_ > head_) { - return (tail_ - head_) % max_items_; + return tail_ - head_; } else { - return max_items_ - (head_ - tail_ ) % max_items_; + return max_items_ - (head_ - tail_ ); } }