Skip to content

Commit

Permalink
use function
Browse files Browse the repository at this point in the history
  • Loading branch information
jeremiahpslewis committed Mar 27, 2024
1 parent c473aef commit 7f5965f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/CircularArrayBuffers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ function Base.empty!(cb::CircularArrayBuffer)
end

function Base.push!(cb::CircularArrayBuffer{T,N}, data) where {T,N}
if cb.nframes == capacity(cb)
if isfull(cb)
cb.first = (cb.first == capacity(cb) ? 1 : cb.first + 1)
else
cb.nframes += 1
Expand Down

0 comments on commit 7f5965f

Please sign in to comment.