From 75bae8df873ed1b1da41ff6cab1d76395487d949 Mon Sep 17 00:00:00 2001 From: Andrew Adams Date: Wed, 11 Dec 2024 07:56:13 -0800 Subject: [PATCH] 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. --- src/ConstantInterval.cpp | 2 -- src/ConstantInterval.h | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/ConstantInterval.cpp b/src/ConstantInterval.cpp index 8bdeec69325c..e65b709efe46 100644 --- a/src/ConstantInterval.cpp +++ b/src/ConstantInterval.cpp @@ -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); diff --git a/src/ConstantInterval.h b/src/ConstantInterval.h index daa6f0f4dbe0..cc3e6893b3b1 100644 --- a/src/ConstantInterval.h +++ b/src/ConstantInterval.h @@ -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);