MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / ReadUint64LE

Method ReadUint64LE

src/core/string_consumer.hpp:326–331  ·  view source on GitHub ↗

* Read binary uint64 using little endian, and advance reader. * @param def Default value to return, if not enough data. * @return Read integer, 'def' if not enough data. * @note The reader is advanced, even if not enough data was present. */

Source from the content-addressed store, hash-verified

324 * @note The reader is advanced, even if not enough data was present.
325 */
326 [[nodiscard]] uint64_t ReadUint64LE(uint64_t def = 0)
327 {
328 auto value = this->PeekUint64LE();
329 this->SkipUint64LE(); // always advance
330 return value.value_or(def);
331 }
332 /**
333 * Skip binary uint64, and advance reader.
334 * @note The reader is advanced, even if not enough data was present.

Callers 1

Calls 2

PeekUint64LEMethod · 0.95
SkipUint64LEMethod · 0.95

Tested by

no test coverage detected