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:
Markus Mäkelä
2018-03-15 13:46:19 +02:00
parent cb170eb88e
commit e90c29cce2
4 changed files with 104 additions and 90 deletions

View File

@ -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.
*