diff options
author | Determinant <ted.sybil@gmail.com> | 2018-07-04 17:56:08 -0400 |
---|---|---|
committer | Determinant <ted.sybil@gmail.com> | 2018-07-04 17:56:08 -0400 |
commit | 9e8165449b8c1c81162ee5fb30a83753df3a4183 (patch) | |
tree | c6947968f6c052a20ec6e7df18a634031831470e /include/salticidae/msg.h | |
parent | 9e89c3b330a8d7cc4fb256411b755c126ba37ec3 (diff) |
...
Diffstat (limited to 'include/salticidae/msg.h')
-rw-r--r-- | include/salticidae/msg.h | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/include/salticidae/msg.h b/include/salticidae/msg.h index 594ac07..874f85f 100644 --- a/include/salticidae/msg.h +++ b/include/salticidae/msg.h @@ -153,16 +153,6 @@ class MsgBase { << "length=" << get_hex(length) << " " << "checksum=" << get_hex(checksum) << " " << "payload=" << get_hex(payload) << ">"; - - //std::string opcode_hex = get_hex(opcode); - //char *buff = new char[128 + opcode_hex.size()]; - //size_t ret = sprintf(buff, - // "<magic=%08x opcode=%s length=%08x checksum=%08x payload=", - // magic, opcode_hex.c_str(), length, checksum); - //buff[ret] = 0; - //std::string res = std::string(buff) + bin2hexstr(payload.data(), length) + ">"; - //delete [] buff; - //return std::move(res); return std::string(s); } @@ -245,9 +235,10 @@ template<typename OpcodeType, OpcodeType _, OpcodeType __> const size_t MsgBase<OpcodeType, _, __>::header_size = - sizeof(MsgBase<OpcodeType, _, __>) - - sizeof(MsgBase<OpcodeType, _, __>::payload) - - sizeof(MsgBase<OpcodeType, _, __>::no_payload); + sizeof(MsgBase<OpcodeType, _, __>::magic) + + sizeof(MsgBase<OpcodeType, _, __>::opcode) + + sizeof(MsgBase<OpcodeType, _, __>::length) + + sizeof(MsgBase<OpcodeType, _, __>::checksum); template<typename OpcodeType, OpcodeType PING, |