From e33fa331afa8e2f730c07a37ed114475957725e9 Mon Sep 17 00:00:00 2001 From: Tomas Pecka <peckato1@fit.cvut.cz> Date: Wed, 1 Nov 2017 15:57:49 +0100 Subject: [PATCH] alib2str: fix parsing set/vector --- alib2str/src/container/string/ObjectsSet.h | 2 ++ alib2str/src/container/string/ObjectsVector.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/alib2str/src/container/string/ObjectsSet.h b/alib2str/src/container/string/ObjectsSet.h index a076dcd230..4c4a9ae5cc 100644 --- a/alib2str/src/container/string/ObjectsSet.h +++ b/alib2str/src/container/string/ObjectsSet.h @@ -28,6 +28,8 @@ ext::set < ValueType > stringApi < ext::set < ValueType > >::parse ( std::istrea if(token.type != container::ContainerFromStringLexer::TokenType::SET_BEGIN) throw exception::CommonException("Expected SET_BEGIN token."); + token = container::ContainerFromStringLexer::next ( input ); + ext::set<ValueType> objectsSet; if(token.type != container::ContainerFromStringLexer::TokenType::SET_END) while(true) { container::ContainerFromStringLexer::putback(input, std::move(token)); diff --git a/alib2str/src/container/string/ObjectsVector.h b/alib2str/src/container/string/ObjectsVector.h index 52d0cc3ebc..547c11bfe2 100644 --- a/alib2str/src/container/string/ObjectsVector.h +++ b/alib2str/src/container/string/ObjectsVector.h @@ -28,6 +28,8 @@ ext::vector < ValueType > stringApi < ext::vector < ValueType > >::parse ( std:: if(token.type != container::ContainerFromStringLexer::TokenType::VECTOR_BEGIN) throw exception::CommonException("Expected VECTOR_BEGIN token."); + token = container::ContainerFromStringLexer::next ( input ); + ext::vector<ValueType> objectsVector; if(token.type != container::ContainerFromStringLexer::TokenType::VECTOR_END) while(true) { container::ContainerFromStringLexer::putback(input, std::move(token)); -- GitLab