mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
More work on the new serialized types.
This commit is contained in:
@@ -257,6 +257,20 @@ int Serializer::addTaggedList(const std::list<TaggedListItem>& list)
|
||||
return ret;
|
||||
}
|
||||
|
||||
int Serializer::addTaggedList(const std::vector<TaggedListItem>& list)
|
||||
{
|
||||
int size=list.size();
|
||||
if(size>255) return -1;
|
||||
int ret=add8(size);
|
||||
if(size!=0)
|
||||
for(std::vector<TaggedListItem>::const_iterator it=list.begin(); it!=list.end(); ++it)
|
||||
{
|
||||
add8(it->first);
|
||||
addVL(it->second);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
bool Serializer::getVL(std::vector<unsigned char>& objectVL, int offset, int& length) const
|
||||
{
|
||||
int b1;
|
||||
|
||||
Reference in New Issue
Block a user