mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-25 17:35:08 +02:00
Updating buffer parser to use new heapless API
This commit is contained in:
parent
49a14e3446
commit
f2beb79d23
1 changed files with 2 additions and 4 deletions
|
@ -53,11 +53,9 @@ public:
|
|||
template<typename T>
|
||||
inline void readCompressedCount(T& result) {
|
||||
// FIXME switch to a heapless implementation as soon as Brad provides it.
|
||||
QByteArray encoded((const char*)(_data + _offset), std::min(sizeof(T) << 1, remaining()));
|
||||
ByteCountCoded<T> codec = encoded;
|
||||
ByteCountCoded<T> codec;
|
||||
_offset += codec.decode(reinterpret_cast<const char*>(_data + _offset), remaining());
|
||||
result = codec.data;
|
||||
encoded = codec;
|
||||
_offset += encoded.size();
|
||||
}
|
||||
|
||||
inline size_t remaining() const {
|
||||
|
|
Loading…
Reference in a new issue