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

Function writeByteWithInfinity

source/EngineInterface/GenomeDescriptionService.cpp:19–22  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17 data.emplace_back(static_cast<uint8_t>(value.value_or(-1)));
18 }
19 void writeByteWithInfinity(std::vector<uint8_t>& data, int value)
20 {
21 data.emplace_back(static_cast<uint8_t>(std::min(255, value)));
22 }
23 void writeBool(std::vector<uint8_t>& data, bool value)
24 {
25 data.emplace_back(value ? 1 : 0);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected