diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-08-02 21:49:52 +0200 |
---|---|---|
committer | dec05eba <0xdec05eba@gmail.com> | 2018-08-02 21:49:59 +0200 |
commit | 3cab1b89229409225c5a45ee1d0308e45c309433 (patch) | |
tree | 9b10fabf243d76f26be4f96a990bf37637e4e435 /sibs/SafeDeserializer.hpp | |
parent | 75768a21955cb6570c31ca87d48fc0b6a2f8490b (diff) |
Add skip method to deserializer1.0.3
Diffstat (limited to 'sibs/SafeDeserializer.hpp')
-rw-r--r-- | sibs/SafeDeserializer.hpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sibs/SafeDeserializer.hpp b/sibs/SafeDeserializer.hpp index 0110920..763140a 100644 --- a/sibs/SafeDeserializer.hpp +++ b/sibs/SafeDeserializer.hpp @@ -97,6 +97,13 @@ namespace sibs { return size; } + + void skip(usize bytesToSkip) + { + bytesToSkip = bytesToSkip < size ? bytesToSkip : size; + size -= bytesToSkip; + data += bytesToSkip; + } private: void verifyExtractSize(usize typeSize) const { |