1
0
Fork 0

updated vpack library

This commit is contained in:
Jan Steemann 2015-12-15 17:11:23 +01:00
parent 2de1bd1ccd
commit d65ccc9e16
1 changed files with 5 additions and 3 deletions

View File

@ -105,9 +105,12 @@ class Buffer {
return std::string(reinterpret_cast<char const*>(_buffer), _pos);
}
void clear() { reset(); }
void reset() {
_pos = 0;
}
void reset() {
void clear() {
reset();
if (_buffer != _local) {
delete[] _buffer;
_buffer = _local;
@ -117,7 +120,6 @@ class Buffer {
memset(_buffer, 0xa5, _alloc);
#endif
}
_pos = 0;
}
inline void push_back(char c) {