diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 05:35:29 +0000 |
commit | 59203c63bb777a3bacec32fb8830fba33540e809 (patch) | |
tree | 58298e711c0ff0575818c30485b44a2f21bf28a0 /mozglue/misc | |
parent | Adding upstream version 126.0.1. (diff) | |
download | firefox-59203c63bb777a3bacec32fb8830fba33540e809.tar.xz firefox-59203c63bb777a3bacec32fb8830fba33540e809.zip |
Adding upstream version 127.0.upstream/127.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mozglue/misc')
-rw-r--r-- | mozglue/misc/TimeStamp.h | 2 | ||||
-rw-r--r-- | mozglue/misc/decimal/Decimal.cpp | 10 | ||||
-rw-r--r-- | mozglue/misc/decimal/Decimal.h | 6 |
3 files changed, 5 insertions, 13 deletions
diff --git a/mozglue/misc/TimeStamp.h b/mozglue/misc/TimeStamp.h index b38882b250..635b62cf13 100644 --- a/mozglue/misc/TimeStamp.h +++ b/mozglue/misc/TimeStamp.h @@ -469,7 +469,7 @@ class TimeStamp { static MFBT_API void RecordProcessRestart(); #ifdef XP_LINUX - uint64_t RawClockMonotonicNanosecondsSinceBoot() { + uint64_t RawClockMonotonicNanosecondsSinceBoot() const { return static_cast<uint64_t>(mValue); } #endif diff --git a/mozglue/misc/decimal/Decimal.cpp b/mozglue/misc/decimal/Decimal.cpp index 7d2bcfa712..e4db6a0f1e 100644 --- a/mozglue/misc/decimal/Decimal.cpp +++ b/mozglue/misc/decimal/Decimal.cpp @@ -239,11 +239,6 @@ Decimal::Decimal(int32_t i32) Decimal::Decimal(Sign sign, int exponent, uint64_t coefficient) : m_data(sign, coefficient ? exponent : 0, coefficient) {} -Decimal::Decimal(const EncodedData& data) - : m_data(data) -{ -} - Decimal::Decimal(const Decimal& other) : m_data(other.m_data) { @@ -853,11 +848,6 @@ Decimal Decimal::infinity(const Sign sign) return Decimal(EncodedData(sign, EncodedData::ClassInfinity)); } -Decimal Decimal::nan() -{ - return Decimal(EncodedData(Positive, EncodedData::ClassNaN)); -} - Decimal Decimal::remainder(const Decimal& rhs) const { const Decimal quotient = *this / rhs; diff --git a/mozglue/misc/decimal/Decimal.h b/mozglue/misc/decimal/Decimal.h index 4bb9a841e5..8d9adbff4f 100644 --- a/mozglue/misc/decimal/Decimal.h +++ b/mozglue/misc/decimal/Decimal.h @@ -234,11 +234,13 @@ public: // Note: fromString doesn't support "infinity" and "nan". static MFBT_API Decimal fromString(const std::string& aValue); static MFBT_API Decimal infinity(Sign); - static MFBT_API Decimal nan(); + static constexpr Decimal nan() { + return Decimal(EncodedData(Positive, EncodedData::ClassNaN)); + } static MFBT_API Decimal zero(Sign); // You should not use below methods. We expose them for unit testing. - MFBT_API explicit Decimal(const EncodedData&); + constexpr explicit Decimal(const EncodedData& data) : m_data(data) {} const EncodedData& value() const { return m_data; } private: |