MXS-1702: Clean up and convert test to C++
Cleaned up and updated the test; the code was written with a pre-C99 standard in mind. Added a get() method into mxs::Buffer to make it easier to use with non-C++ functions.
This commit is contained in:
@ -533,6 +533,19 @@ public:
|
||||
return *this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the underlying GWBUF.
|
||||
*
|
||||
* @return The underlying @c GWBUF.
|
||||
*
|
||||
* @attention This does not release ownership of the buffer. The returned pointer must never be
|
||||
* freed by the caller.
|
||||
*/
|
||||
GWBUF* get()
|
||||
{
|
||||
return m_pBuffer;
|
||||
}
|
||||
|
||||
/**
|
||||
* Resets the underlying GWBUF.
|
||||
*
|
||||
|
Reference in New Issue
Block a user