Skip to content

Commit 511a91a

Browse files
committed
patch: optimized adding any
Instead of inserting, modify the point set to its new equivalent form.
1 parent 2e7c7d0 commit 511a91a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/ctre/first.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,9 @@ template <size_t Capacity> class point_set {
495495
insert(A,B);
496496
}
497497
constexpr void populate(can_be_anything) {
498-
insert(std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::max());
498+
points[0].low = std::numeric_limits<int64_t>::min();
499+
points[0].high = std::numeric_limits<int64_t>::max();
500+
used = 1;
499501
}
500502
template <typename... Content> constexpr void populate(ctre::negative_set<Content...> nset) {
501503
negative_helper(nset, [&](int64_t low, int64_t high){

0 commit comments

Comments
 (0)