mfbt/decimal/zero-serialization.patch

Wed, 31 Dec 2014 06:55:50 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:55:50 +0100
changeset 2
7e26c7da4463
permissions
-rw-r--r--

Added tag UPSTREAM_283F7C6 for changeset ca08bd8f51b2

michael@0 1 diff --git a/mfbt/decimal/Decimal.cpp b/mfbt/decimal/Decimal.cpp
michael@0 2 --- a/mfbt/decimal/Decimal.cpp
michael@0 3 +++ b/mfbt/decimal/Decimal.cpp
michael@0 4 @@ -278,17 +278,17 @@ bool Decimal::EncodedData::operator==(co
michael@0 5 }
michael@0 6
michael@0 7 Decimal::Decimal(int32_t i32)
michael@0 8 : m_data(i32 < 0 ? Negative : Positive, 0, i32 < 0 ? static_cast<uint64_t>(-static_cast<int64_t>(i32)) : static_cast<uint64_t>(i32))
michael@0 9 {
michael@0 10 }
michael@0 11
michael@0 12 Decimal::Decimal(Sign sign, int exponent, uint64_t coefficient)
michael@0 13 - : m_data(sign, exponent, coefficient)
michael@0 14 + : m_data(sign, coefficient ? exponent : 0, coefficient)
michael@0 15 {
michael@0 16 }
michael@0 17
michael@0 18 Decimal::Decimal(const EncodedData& data)
michael@0 19 : m_data(data)
michael@0 20 {
michael@0 21 }
michael@0 22

mercurial