MXS-2015: Remove buffer iterator

The iterator to the buffer isn't really needed as the beginning of the
buffer can be used instead. This should make the code more robust. Changed
the internal buffer from a vector to a deque as the latter is more
appropriate for insertion on one end and consumption on the other.
This commit is contained in:
Markus Mäkelä
2018-08-20 13:04:49 +03:00
parent c38dcff53c
commit 9663c52f50
2 changed files with 16 additions and 22 deletions

View File

@ -21,6 +21,7 @@
#include <string>
#include <tr1/memory>
#include <vector>
#include <deque>
#include <map>
#include <algorithm>
#include <jansson.h>
@ -137,8 +138,7 @@ private:
SValueVector m_keys;
SValueVector m_types;
int m_timeout;
std::vector<char> m_buffer;
std::vector<char>::iterator m_buf_ptr;
std::deque<char> m_buffer;
SRow m_first_row;
bool m_connected;