imprved readability of the logic in rstlvidset serialization

This commit is contained in:
csoler 2020-05-16 13:13:48 +02:00
parent 6008599f02
commit dc03f8ff49
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -92,11 +92,15 @@ template<class ID_CLASS,uint32_t TLV_TYPE> class RS_DEPRECATED_FOR(std::set<>) t
ids.insert(id) ; ids.insert(id) ;
} }
if(*offset != tlvend) if(*offset != tlvend)
{
std::cerr << "(EE) deserialisaiton error in " << __PRETTY_FUNCTION__ << std::endl; std::cerr << "(EE) deserialisaiton error in " << __PRETTY_FUNCTION__ << std::endl;
else if(!ok) ok = false;
}
if(!ok)
std::cerr << "(WW) something wrong in ID_CLASS.deserialise in " << __PRETTY_FUNCTION__ << std::endl; std::cerr << "(WW) something wrong in ID_CLASS.deserialise in " << __PRETTY_FUNCTION__ << std::endl;
return *offset == tlvend ; return ok;
} }
virtual std::ostream &print(std::ostream &out, uint16_t /* indent */) const virtual std::ostream &print(std::ostream &out, uint16_t /* indent */) const
{ {