small optimization to the osgb/t serializers.

This commit is contained in:
Pjotr Svetachov 2016-05-31 11:27:30 +01:00 committed by Robert Osfield
parent 5c46d9de3e
commit a4c9cac2a8

View File

@ -947,6 +947,7 @@ public:
if ( is.isBinary() ) if ( is.isBinary() )
{ {
is >> size; is >> size;
list.reserve(size);
for ( unsigned int i=0; i<size; ++i ) for ( unsigned int i=0; i<size; ++i )
{ {
ValueType value; ValueType value;
@ -958,6 +959,7 @@ public:
else if ( is.matchString(_name) ) else if ( is.matchString(_name) )
{ {
is >> size; is >> size;
list.reserve(size);
if ( size>0 ) is >> is.BEGIN_BRACKET; if ( size>0 ) is >> is.BEGIN_BRACKET;
for ( unsigned int i=0; i<size; ++i ) for ( unsigned int i=0; i<size; ++i )
{ {
@ -1102,6 +1104,7 @@ public:
if ( is.isBinary() ) if ( is.isBinary() )
{ {
is >> size; is >> size;
list.reserve(size);
for ( unsigned int i=0; i<size; ++i ) for ( unsigned int i=0; i<size; ++i )
{ {
ValueType value; ValueType value;
@ -1112,6 +1115,7 @@ public:
else if ( is.matchString(_name) ) else if ( is.matchString(_name) )
{ {
is >> size; is >> size;
list.reserve(size);
if ( size>0 ) is >> is.BEGIN_BRACKET; if ( size>0 ) is >> is.BEGIN_BRACKET;
for ( unsigned int i=0; i<size; ++i ) for ( unsigned int i=0; i<size; ++i )
{ {