From abab663cb9bec04e143e82d4c2e2f2c6e7eb3f45 Mon Sep 17 00:00:00 2001 From: youngwolf Date: Sat, 2 Jan 2021 23:01:16 +0800 Subject: [PATCH] A trivial change. --- include/ascs/ext/unpacker.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/ascs/ext/unpacker.h b/include/ascs/ext/unpacker.h index fc24efe..6619e1f 100644 --- a/include/ascs/ext/unpacker.h +++ b/include/ascs/ext/unpacker.h @@ -404,9 +404,9 @@ public: virtual typename super::buffer_type prepare_next_recv() {return unpacker_.prepare_next_recv();} //msg must has been unpacked by this unpacker - virtual char* raw_data(typename super::msg_type& msg) const {return const_cast(super::stripped() ? msg.data() : std::next(msg.data(), ASCS_HEAD_LEN));} - virtual const char* raw_data(typename super::msg_ctype & msg) const {return super::stripped() ? msg.data() : std::next(msg.data(), ASCS_HEAD_LEN);} - virtual size_t raw_data_len(typename super::msg_ctype & msg) const {return super::stripped() ? msg.size() : msg.size() - ASCS_HEAD_LEN;} + virtual char* raw_data(typename super::msg_type& msg) const {return unpacker_.raw_data(*msg.raw_buffer());} + virtual const char* raw_data(typename super::msg_ctype& msg) const {return unpacker_.raw_data(*msg.raw_buffer());} + virtual size_t raw_data_len(typename super::msg_ctype& msg) const {return unpacker_.raw_data_len(*msg.raw_buffer());} protected: Unpacker unpacker_; -- GitLab