Skip to content

Commit 75bae8d

Browse files
authoredDec 11, 2024
Make the default constructor for ConstantInterval inlinable (#8505)
It's just zero-intialization of the (exposed) struct members, so it's silly to have to call a function in another TU for it.
1 parent 65adb9c commit 75bae8d

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed
 

‎src/ConstantInterval.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77
namespace Halide {
88
namespace Internal {
99

10-
ConstantInterval::ConstantInterval() = default;
11-
1210
ConstantInterval::ConstantInterval(int64_t min, int64_t max)
1311
: min(min), max(max), min_defined(true), max_defined(true) {
1412
internal_assert(min <= max);

‎src/ConstantInterval.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct ConstantInterval {
2222
bool min_defined = false, max_defined = false;
2323

2424
/* A default-constructed Interval is everything */
25-
ConstantInterval();
25+
ConstantInterval() = default;
2626

2727
/** Construct an interval from a lower and upper bound. */
2828
ConstantInterval(int64_t min, int64_t max);

0 commit comments

Comments
 (0)
Please sign in to comment.