From dfd218c07951941205f3511b65977bfdf947f336 Mon Sep 17 00:00:00 2001 From: Arthur Britto Date: Sun, 20 May 2012 18:47:05 -0700 Subject: [PATCH] Optimize and fix STAmount. --- src/Amount.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Amount.cpp b/src/Amount.cpp index 9d63998d13..6aa3439728 100644 --- a/src/Amount.cpp +++ b/src/Amount.cpp @@ -35,9 +35,7 @@ bool STAmount::currencyFromString(uint160& uDstCurrency, const std::string& sCur s.addZeros(16/8); s.addZeros(24/8); - SerializerIterator sit(s); - - uDstCurrency = sit.get160(); + s.get160(uDstCurrency, 0); } else { @@ -57,8 +55,8 @@ std::string STAmount::getCurrencyHuman() } else { - uint160 uReserved = mCurrency; - Serializer s(160/20); + uint160 uReserved = mCurrency; + Serializer s(160/8); s.add160(mCurrency);