Skip to content
This repository was archived by the owner on May 6, 2021. It is now read-only.

Commit defbcc5

Browse files
authored
add reset method for StackFrames (#113)
1 parent f46927a commit defbcc5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/components/processors.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ function Base.push!(
5252
) where {T,N}
5353
push!(cb, select_last_frame(stacked_data))
5454
end
55+
56+
function RLBase.reset!(p::StackFrames{T}) where T
57+
empty!(p.buffer)
58+
for _ in 1:capacity(p.buffer)
59+
push!(p.buffer, zeros(T, size(p.buffer)[1:N-1]))
60+
end
61+
p
62+
end

0 commit comments

Comments
 (0)