Fix documentation build under maverick (doxygen 1.7.1)
[senf.git] / senf / Packets / DefaultBundle / ListOptionTypeParser.cti
index 7c0e324..2dad6d2 100644 (file)
@@ -1,4 +1,4 @@
-// $Id: ListOptionTypeParser.cti 869 2008-06-09 13:57:27Z pug $
+// $Id$
 //
 // Copyright (C) 2009
 // Fraunhofer Institute for Open Communication Systems (FOKUS)
@@ -28,9 +28,9 @@
 // Custom includes
 
 #define prefix_ inline
-///////////////////////////////cti.p///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>
 
 template <class ElementParser, class AuxPolicy>
@@ -44,7 +44,7 @@ template <class Arg>
 prefix_
 senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>::
 ListOptionTypeParser_Policy(Arg const & arg)
-    : AuxPolicy(arg) 
+    : AuxPolicy(arg)
 {}
 
 template <class ElementParser, class AuxPolicy>
@@ -80,7 +80,7 @@ senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>::init(data_it
     AuxPolicy::aux(0, i, s);
 }
 
-///////////////////////////////////////////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 // senf::detail::ListOptionTypeParser_Policy<ElementParser,BytesParser>
 
 //constructor
@@ -88,7 +88,7 @@ template <class ElementParser, class AuxPolicy>
 prefix_
 senf::detail::ListOptionTypeParser_Policy<ElementParser,AuxPolicy>::container_policy::
 container_policy(parser_policy const & p)
-    : AuxPolicy(p) 
+    : AuxPolicy(p)
 {}
 
 //destructor
@@ -108,7 +108,11 @@ construct(container_type & c)
     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
@@ -221,7 +225,7 @@ update(container_type const & c)
         return;
     data_iterator i(AuxPolicy::adjust(c.i(), c.state()));
     data_iterator j(i);
-    for (size_type n(n_); n; --n, std::advance(j, senf::bytes(ElementParser(j,c.state()))));
+    for (size_type n(n_); n; --n, std::advance(j, senf::bytes(ElementParser(j,c.state())))) { ; }
     realAux_ = std::distance(i, j);
     container_size_ = c.data().size();
 }
@@ -278,7 +282,7 @@ raw(container_type const & c, iterator_data const & d)
     return container_type::iterator::get(d).i();
 }
 
-///////////////////////////////cti.e///////////////////////////////////////
+//-/////////////////////////////////////////////////////////////////////////////////////////////////
 #undef prefix_
 
 \f