Skip to content

Commit

Permalink
Make the default constructor for ConstantInterval inlinable (#8505)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
abadams authored Dec 11, 2024
1 parent 65adb9c commit 75bae8d
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions src/ConstantInterval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
namespace Halide {
namespace Internal {

ConstantInterval::ConstantInterval() = default;

ConstantInterval::ConstantInterval(int64_t min, int64_t max)
: min(min), max(max), min_defined(true), max_defined(true) {
internal_assert(min <= max);
Expand Down
2 changes: 1 addition & 1 deletion src/ConstantInterval.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct ConstantInterval {
bool min_defined = false, max_defined = false;

/* A default-constructed Interval is everything */
ConstantInterval();
ConstantInterval() = default;

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

0 comments on commit 75bae8d

Please sign in to comment.