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

Function readByte

source/EngineInterface/GenomeDescriptionService.cpp:72–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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));

Callers 10

readOptionalByteFunction · 0.85
readByteWithInfinityFunction · 0.85
readBoolFunction · 0.85
readWordFunction · 0.85
readFloatFunction · 0.85
readAngleFunction · 0.85
readDistanceFunction · 0.85
readStiffnessFunction · 0.85
readGenomeFunction · 0.85

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected