Skip to content

Commit bfffca7

Browse files
committed
Revert decode_traits change
1 parent 2fd6925 commit bfffca7

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

include/jsoncons/decode_traits.hpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -336,10 +336,6 @@ namespace jsoncons {
336336
case staj_event_type::begin_array:
337337
{
338338
T v;
339-
if (cursor.current().size() > 0)
340-
{
341-
v.capacity(cursor.current().size());
342-
}
343339
typed_array_visitor<T> visitor(v);
344340
cursor.read_to(visitor, ec);
345341
return v;
@@ -379,10 +375,6 @@ namespace jsoncons {
379375
case staj_event_type::begin_array:
380376
{
381377
T v;
382-
if (cursor.current().size() > 0)
383-
{
384-
v.capacity(cursor.current().size());
385-
}
386378
typed_array_visitor<T> visitor(v);
387379
cursor.read_to(visitor, ec);
388380
return v;
@@ -497,10 +489,6 @@ namespace jsoncons {
497489
ec = conv_errc::not_map;
498490
return val;
499491
}
500-
if (cursor.current().size() > 0)
501-
{
502-
val.capacity(cursor.current().size());
503-
}
504492
cursor.next(ec);
505493

506494
while (cursor.current().event_type() != staj_event_type::end_object && !ec)
@@ -545,10 +533,6 @@ namespace jsoncons {
545533
ec = conv_errc::not_map;
546534
return val;
547535
}
548-
if (cursor.current().size() > 0)
549-
{
550-
val.capacity(cursor.current().size());
551-
}
552536
cursor.next(ec);
553537

554538
while (cursor.current().event_type() != staj_event_type::end_object && !ec)

0 commit comments

Comments
 (0)