diff --git a/src/lib/support/BufferWriter.h b/src/lib/support/BufferWriter.h index 64c22af21b43cf..ad474251516421 100644 --- a/src/lib/support/BufferWriter.h +++ b/src/lib/support/BufferWriter.h @@ -87,28 +87,8 @@ class BufferWriter uint8_t * Buffer() { return mBuf; } const uint8_t * Buffer() const { return mBuf; } - BufferWriter & Format(const char * format, ...) ENFORCE_FORMAT(2, 3) - { - va_list args; - va_start(args, format); - VFormat(format, args); - va_end(args); - return *this; - } - void Reset() { mNeeded = 0; } - /// Since this uses vsnprintf internally, on overflow - /// this will write one less byte that strictly can be - /// written (since null terminator will be in the binary data) - BufferWriter & VFormat(const char * format, va_list args) ENFORCE_FORMAT(2, 0); - - /// Assume a specific size for the buffer instead of mSize - /// - /// This is to allow avoiding off-by-one overflow truncation - /// when we know the underlying buffer size is larger. - BufferWriter & VFormatWithSize(size_t size, const char * format, va_list args) ENFORCE_FORMAT(3, 0); - protected: uint8_t * mBuf; size_t mSize;