diff --git a/BaseLib/TimeInterval.cpp b/BaseLib/TimeInterval.cpp index 78e01e0ef8a25283e6ce78ffd6b0ccb67cf7d27a..24494ef7bcc0a65bbd37d41a227c77c4206d7e71 100644 --- a/BaseLib/TimeInterval.cpp +++ b/BaseLib/TimeInterval.cpp @@ -31,6 +31,6 @@ TimeInterval createTimeInterval(ConfigTree const& config) //! \ogs_file_param{prj__time_loop__processes__process__time_interval__end} time_interval_config.getConfigParameter<double>("end"); - return TimeInterval(start_time, end_time); + return {start_time, end_time}; } } // namespace BaseLib diff --git a/BaseLib/TimeInterval.h b/BaseLib/TimeInterval.h index 6380449240feb374563afc4b86dbe53b2de3b1f5..c02e46c75ea88e74f3ba0357587bc00621a1c61d 100644 --- a/BaseLib/TimeInterval.h +++ b/BaseLib/TimeInterval.h @@ -20,26 +20,16 @@ class ConfigTree; * Class for a time interval, which has a member to check whether the given time * is in this time interval. */ -class TimeInterval final +struct TimeInterval final { public: - TimeInterval(const double start_time, const double end_time) - : _start_time(start_time), _end_time(end_time) - { - } - - TimeInterval(const TimeInterval& time_inverval) = default; - - TimeInterval& operator=(const TimeInterval& time_inverval) = default; - bool contains(const double current_time) const { - return (current_time >= _start_time && current_time <= _end_time); + return (current_time >= start_time && current_time <= end_time); } -private: - double _start_time; - double _end_time; + double start_time; + double end_time; }; TimeInterval createTimeInterval(ConfigTree const& config); diff --git a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h index 9e48c3218c368726d2e589e10e7de15861b21f18..c6e07e8efb64bcc3178121025e885107b184ab06 100644 --- a/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h +++ b/ProcessLib/BoundaryCondition/DirichletBoundaryConditionWithinTimeInterval.h @@ -21,7 +21,7 @@ namespace BaseLib { class ConfigTree; -class TimeInterval; +struct TimeInterval; } namespace MeshLib