mfbt/decimal/zero-serialization.patch

Thu, 15 Jan 2015 15:55:04 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 15 Jan 2015 15:55:04 +0100
branch
TOR_BUG_9701
changeset 9
a63d609f5ebe
permissions
-rw-r--r--

Back out 97036ab72558 which inappropriately compared turds to third parties.

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