mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-03 01:15:53 +00:00
Cleanup.
This commit is contained in:
@@ -284,6 +284,7 @@ STAccount* STAccount::construct(SerializerIterator& u, SField::ref name)
|
|||||||
STVector256* STVector256::construct(SerializerIterator& u, SField::ref name)
|
STVector256* STVector256::construct(SerializerIterator& u, SField::ref name)
|
||||||
{
|
{
|
||||||
std::vector<unsigned char> data = u.getVL();
|
std::vector<unsigned char> data = u.getVL();
|
||||||
|
std::vector<unsigned char>::iterator begin = data.begin();
|
||||||
|
|
||||||
UPTR_T<STVector256> vec(new STVector256(name));
|
UPTR_T<STVector256> vec(new STVector256(name));
|
||||||
|
|
||||||
@@ -293,10 +294,10 @@ STVector256* STVector256::construct(SerializerIterator& u, SField::ref name)
|
|||||||
unsigned int uStart = 0;
|
unsigned int uStart = 0;
|
||||||
for (unsigned int i = 0; i != count; i++)
|
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
|
// 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<unsigned char>(data.begin()+uStart, data.begin()+uEnd)));
|
vec->mValue.push_back(uint256(std::vector<unsigned char>(begin + uStart, begin + uEnd)));
|
||||||
uStart = uEnd;
|
uStart = uEnd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user