Added wxMemoryBuffer::Clear() and IsEmpty() methods.
Add two convenient methods which may be used instead of testing or setting the buffer length. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70407 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -309,6 +309,17 @@ public:
|
||||
*/
|
||||
void AppendData(const void *data, size_t len);
|
||||
|
||||
/**
|
||||
Clear the buffer contents.
|
||||
|
||||
The buffer won't contain any data after this method is called.
|
||||
|
||||
@see IsEmpty()
|
||||
|
||||
@since 2.9.4
|
||||
*/
|
||||
void Clear();
|
||||
|
||||
/**
|
||||
Ensure that the buffer is big enough and return a pointer to the start
|
||||
of the empty space in the buffer. This pointer can be used to directly
|
||||
@@ -343,6 +354,15 @@ public:
|
||||
*/
|
||||
void* GetWriteBuf(size_t sizeNeeded);
|
||||
|
||||
/**
|
||||
Returns true if the buffer contains no data.
|
||||
|
||||
@see Clear()
|
||||
|
||||
@since 2.9.4
|
||||
*/
|
||||
bool IsEmpty() const;
|
||||
|
||||
/**
|
||||
Ensures the buffer has at least @a size bytes available.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user