MCPcopy Create free account
hub / github.com/chrxh/alien / readOptionalByte

Function readOptionalByte

source/EngineInterface/GenomeDescriptionService.cpp:80–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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));
83 return value > 127 ? std::nullopt : std::make_optional(value);
84 }
85 std::optional<int> readOptionalByte(std::vector<uint8_t> const& data, int& pos, int moduloValue)
86 {
87 auto value = static_cast<int>(readByte(data, pos));

Callers 1

Calls 1

readByteFunction · 0.85

Tested by

no test coverage detected