mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
AK: Mark Time::max() / Time::min() / Time::zero() as constexpr
No reason for these static helper functions to not be constexpr.
This commit is contained in:
parent
8f552c9979
commit
2dd6d2121a
Notes:
sideshowbarker
2024-07-18 07:32:30 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/2dd6d2121ad Pull-request: https://github.com/SerenityOS/serenity/pull/9145 Reviewed-by: https://github.com/tomuta ✅
1 changed files with 3 additions and 3 deletions
|
@ -139,9 +139,9 @@ public:
|
|||
}
|
||||
static Time from_timespec(const struct timespec&);
|
||||
static Time from_timeval(const struct timeval&);
|
||||
static Time min() { return Time(-0x8000'0000'0000'0000LL, 0); };
|
||||
static Time zero() { return Time(0, 0); };
|
||||
static Time max() { return Time(0x7fff'ffff'ffff'ffffLL, 999'999'999); };
|
||||
constexpr static Time min() { return Time(-0x8000'0000'0000'0000LL, 0); };
|
||||
constexpr static Time zero() { return Time(0, 0); };
|
||||
constexpr static Time max() { return Time(0x7fff'ffff'ffff'ffffLL, 999'999'999); };
|
||||
|
||||
// Truncates towards zero (2.8s to 2s, -2.8s to -2s).
|
||||
i64 to_truncated_seconds() const;
|
||||
|
|
Loading…
Reference in a new issue