Skip to content

Commit e92b477

Browse files
committed
range-for with reference instead copy... fixes #316
1 parent 633dd23 commit e92b477

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

include/ctre/first.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ template <size_t Capacity> class point_set {
463463
//insert_point(high, low);
464464
}
465465
constexpr bool check(int64_t low, int64_t high) {
466-
for (auto r: *this) {
466+
for (const auto & r: *this) {
467467
if (r.low <= low && low <= r.high) {
468468
return true;
469469
} else if (r.low <= high && high <= r.high) {

single-header/ctre-unicode.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4467,7 +4467,7 @@ template <size_t Capacity> class point_set {
44674467
//insert_point(high, low);
44684468
}
44694469
constexpr bool check(int64_t low, int64_t high) {
4470-
for (auto r: *this) {
4470+
for (const auto & r: *this) {
44714471
if (r.low <= low && low <= r.high) {
44724472
return true;
44734473
} else if (r.low <= high && high <= r.high) {

single-header/ctre.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4464,7 +4464,7 @@ template <size_t Capacity> class point_set {
44644464
//insert_point(high, low);
44654465
}
44664466
constexpr bool check(int64_t low, int64_t high) {
4467-
for (auto r: *this) {
4467+
for (const auto & r: *this) {
44684468
if (r.low <= low && low <= r.high) {
44694469
return true;
44704470
} else if (r.low <= high && high <= r.high) {

0 commit comments

Comments
 (0)