| 70 | } |
| 71 | |
| 72 | uint8_t readByte(std::vector<uint8_t> const& data, int& pos) |
| 73 | { |
| 74 | if (pos >= data.size()) { |
| 75 | return 0; |
| 76 | } |
| 77 | uint8_t result = data[pos++]; |
| 78 | return result; |
| 79 | } |
| 80 | std::optional<int> readOptionalByte(std::vector<uint8_t> const& data, int& pos) |
| 81 | { |
| 82 | auto value = static_cast<int>(readByte(data, pos)); |
no test coverage detected