Skip to content

Commit 871a29c

Browse files
authored
Merge pull request #184 from Andersama/patch-8
patch: optimized adding any
2 parents 47bc56f + 37831a0 commit 871a29c

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
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){

single-header/ctre-unicode.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3933,7 +3933,9 @@ template <size_t Capacity> class point_set {
39333933
insert(A,B);
39343934
}
39353935
constexpr void populate(can_be_anything) {
3936-
insert(std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::max());
3936+
points[0].low = std::numeric_limits<int64_t>::min();
3937+
points[0].high = std::numeric_limits<int64_t>::max();
3938+
used = 1;
39373939
}
39383940
template <typename... Content> constexpr void populate(ctre::negative_set<Content...> nset) {
39393941
negative_helper(nset, [&](int64_t low, int64_t high){

single-header/ctre.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3930,7 +3930,9 @@ template <size_t Capacity> class point_set {
39303930
insert(A,B);
39313931
}
39323932
constexpr void populate(can_be_anything) {
3933-
insert(std::numeric_limits<int64_t>::min(), std::numeric_limits<int64_t>::max());
3933+
points[0].low = std::numeric_limits<int64_t>::min();
3934+
points[0].high = std::numeric_limits<int64_t>::max();
3935+
used = 1;
39343936
}
39353937
template <typename... Content> constexpr void populate(ctre::negative_set<Content...> nset) {
39363938
negative_helper(nset, [&](int64_t low, int64_t high){

0 commit comments

Comments
 (0)