From aad99f4955170adc07ad94ef2d9b700f74385e6f Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 9 Apr 2013 20:08:19 -0700 Subject: [PATCH] Cleanup. --- src/cpp/ripple/SerializedTypes.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/SerializedTypes.cpp b/src/cpp/ripple/SerializedTypes.cpp index e883a4a453..cedb1be72e 100644 --- a/src/cpp/ripple/SerializedTypes.cpp +++ b/src/cpp/ripple/SerializedTypes.cpp @@ -284,6 +284,7 @@ STAccount* STAccount::construct(SerializerIterator& u, SField::ref name) STVector256* STVector256::construct(SerializerIterator& u, SField::ref name) { std::vector data = u.getVL(); + std::vector::iterator begin = data.begin(); UPTR_T vec(new STVector256(name)); @@ -293,10 +294,10 @@ STVector256* STVector256::construct(SerializerIterator& u, SField::ref name) unsigned int uStart = 0; for (unsigned int i = 0; i != count; i++) { - unsigned int uEnd = uStart+(256/8); + unsigned int uEnd = uStart + (256 / 8); // This next line could be optimized to construct a default uint256 in the vector and then copy into it - vec->mValue.push_back(uint256(std::vector(data.begin()+uStart, data.begin()+uEnd))); + vec->mValue.push_back(uint256(std::vector(begin + uStart, begin + uEnd))); uStart = uEnd; }