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

Method PutUint64LE

src/core/string_builder.cpp:79–92  ·  view source on GitHub ↗

* Append binary uint64 using little endian. */

Source from the content-addressed store, hash-verified

77 * Append binary uint64 using little endian.
78 */
79void BaseStringBuilder::PutUint64LE(uint64_t value)
80{
81 std::array<char, 8> buf{
82 static_cast<char>(static_cast<uint8_t>(value)),
83 static_cast<char>(static_cast<uint8_t>(value >> 8)),
84 static_cast<char>(static_cast<uint8_t>(value >> 16)),
85 static_cast<char>(static_cast<uint8_t>(value >> 24)),
86 static_cast<char>(static_cast<uint8_t>(value >> 32)),
87 static_cast<char>(static_cast<uint8_t>(value >> 40)),
88 static_cast<char>(static_cast<uint8_t>(value >> 48)),
89 static_cast<char>(static_cast<uint8_t>(value >> 56))
90 };
91 this->PutBuffer(buf);
92}
93
94/**
95 * Append binary int64 using little endian.

Callers 2

PutSint64LEMethod · 0.95
string_builder.cppFile · 0.80

Calls 1

PutBufferMethod · 0.45

Tested by

no test coverage detected