-// $Id: ListOptionTypeParser.cti 869 2008-06-09 13:57:27Z pug $
+// $Id$
//
// Copyright (C) 2009
// Fraunhofer Institute for Open Communication Systems (FOKUS)
// Custom includes
#define prefix_ inline
-///////////////////////////////cti.p///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>
template <class ElementParser, class AuxPolicy>
prefix_
senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>::
ListOptionTypeParser_Policy(Arg const & arg)
- : AuxPolicy(arg)
+ : AuxPolicy(arg)
{}
template <class ElementParser, class AuxPolicy>
AuxPolicy::aux(0, i, s);
}
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
// senf::detail::ListOptionTypeParser_Policy<ElementParser,BytesParser>
//constructor
prefix_
senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>::container_policy::
container_policy(parser_policy const & p)
- : AuxPolicy(p)
+ : AuxPolicy(p)
{}
//destructor
realAux_ = (AuxPolicy::aux(i, c.state()) * 8) + 6;
safe_data_iterator e = i + realAux_;
for (n_ = 0; i != e;) {
- unsigned int elByte = senf::bytes(ElementParser(i, c.state()));
+ size_type elByte;
+ if (i[0] == 0u)
+ elByte = 1;
+ else
+ elByte = senf::bytes(ElementParser(i, c.state()));
if (((i + elByte) == e) && (i[0] == 0u || i[0] == 1u)) { //check weather last element is padding or not
realAux_ -= std::distance(i, e);
c.data().erase(i, e); //delete padding
return container_type::iterator::get(d).i();
}
-///////////////////////////////cti.e///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
#undef prefix_
\f