src/Network/Buffer.hh
changeset 365 65295dfbbf64
parent 284 27ce69fd1e06
child 378 5589abf5e61b
equal deleted inserted replaced
364:033f8236241a 365:65295dfbbf64
   169          */
   169          */
   170         template <typename PrefixType> void flush_data (void) {
   170         template <typename PrefixType> void flush_data (void) {
   171             PrefixType prefix;
   171             PrefixType prefix;
   172             
   172             
   173             // we *must* have a valid prefix
   173             // we *must* have a valid prefix
   174             assert(peek_prefix(prefix));
   174             if (!peek_prefix(prefix))
       
   175                 assert(false);
   175 
   176 
   176             // trim the bytes out
   177             // trim the bytes out
   177             trim(sizeof(PrefixType) + prefix);
   178             trim(sizeof(PrefixType) + prefix);
   178         }
   179         }
   179 };
   180 };