diff --git a/src/Util/RingBuffer.h b/src/Util/RingBuffer.h index 8ac1c85c..0474f46d 100644 --- a/src/Util/RingBuffer.h +++ b/src/Util/RingBuffer.h @@ -86,12 +86,6 @@ class _RingReader { _msg_cb = cb ? std::move(cb) : [](const Any &data) {}; } -private: - void onRead(const T &data, bool /*is_key*/) { _read_cb(data); } - void onMessage(const Any &data) { _msg_cb(data); } - void onDetach() const { _detach_cb(); } - Any getInfo() { return _info_cb(); } - void flushGop() { if (!_storage) { return; @@ -101,6 +95,11 @@ class _RingReader { }); } +private: + void onRead(const T &data, bool /*is_key*/) { _read_cb(data); } + void onMessage(const Any &data) { _msg_cb(data); } + void onDetach() const { _detach_cb(); } + Any getInfo() { return _info_cb(); } private: std::shared_ptr<_RingStorage> _storage;