Skip to content

Commit

Permalink
fix UpdatedSet union!
Browse files Browse the repository at this point in the history
  • Loading branch information
guo-yong-zhi committed Dec 28, 2021
1 parent 42a8e79 commit 46b67c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/qtree_functions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ UpdatedSet(maxlen::Int) = UpdatedSet(maxlen, maxlen, Set{Int}(1:maxlen))
UpdatedSet(labels, maxlen::Int=length(labels)) = UpdatedSet(length(labels), maxlen, Set{Int}(labels))
function Base.union!(s::UpdatedSet, c)
s.updatelen = length(c)
length(s.set) == s.maxlen || union!(s.set, c)
length(s.set) == s.maxlen ? s : union!(s.set, c)
end
Base.empty!(s::UpdatedSet) = empty!(s.set)
Base.length(s::UpdatedSet) = length(s.set)
Expand Down

2 comments on commit 46b67c0

@guo-yong-zhi
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register()

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/51335

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.8.0 -m "<description of version>" 46b67c05396081720f5ef19d566d5c3630239eea
git push origin v0.8.0

Please sign in to comment.