perf[protocol]: 支持cpp协议增加字段向前兼容

This commit is contained in:
jaysunxiao
2022-05-22 20:52:48 +08:00
parent 68fb890e0e
commit 389de2b6b3
13 changed files with 327 additions and 253 deletions
@@ -132,6 +132,10 @@ namespace zfoo {
}
}
inline bool isReadable() {
return m_writerIndex > m_readerIndex;
}
inline void writeBool(const bool &value) {
ensureCapacity(1);
int8_t v = value ? 1 : 0;