paulbergmann_mpstubs/object/stringbuffer.cc

16 lines
196 B
C++
Raw Normal View History

2023-09-22 11:19:29 +02:00
#include "stringbuffer.h"
2023-10-28 13:42:17 +02:00
void Stringbuffer::put(char c) {
if (pos < sizeof(buffer)/sizeof(char)) {
buffer[pos] = c;
pos++;
}
if (pos >= sizeof(buffer)/sizeof(char)) {
flush();
}
}