paulbergmann_mpstubs/object/stringbuffer.cc

16 lines
196 B
C++

#include "stringbuffer.h"
void Stringbuffer::put(char c) {
if (pos < sizeof(buffer)/sizeof(char)) {
buffer[pos] = c;
pos++;
}
if (pos >= sizeof(buffer)/sizeof(char)) {
flush();
}
}