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

Method PutUint32LE

src/core/string_builder.cpp:57–66  ·  view source on GitHub ↗

* Append binary uint32 using little endian. */

Source from the content-addressed store, hash-verified

55 * Append binary uint32 using little endian.
56 */
57void BaseStringBuilder::PutUint32LE(uint32_t value)
58{
59 std::array<char, 4> buf{
60 static_cast<char>(static_cast<uint8_t>(value)),
61 static_cast<char>(static_cast<uint8_t>(value >> 8)),
62 static_cast<char>(static_cast<uint8_t>(value >> 16)),
63 static_cast<char>(static_cast<uint8_t>(value >> 24))
64 };
65 this->PutBuffer(buf);
66}
67
68/**
69 * Append binary int32 using little endian.

Callers 2

PutSint32LEMethod · 0.95
string_builder.cppFile · 0.80

Calls 1

PutBufferMethod · 0.45

Tested by

no test coverage detected