Exemple #1
0
 void flush() {
     if (!m_open) return;
     size_t n;
     if ((n = m_buf.size()) > 0) {
         m_file.write(m_buf.read(n), n);
         m_buf.crunch();
     }
 }
Exemple #2
0
 /// confirm consuming of n bytes
 void commit(size_t n) { m_buf.read(n); }