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

Method PutUint16LE

src/core/string_builder.cpp:37–44  ·  view source on GitHub ↗

* Append binary uint16 using little endian. */

Source from the content-addressed store, hash-verified

35 * Append binary uint16 using little endian.
36 */
37void BaseStringBuilder::PutUint16LE(uint16_t value)
38{
39 std::array<char, 2> buf{
40 static_cast<char>(static_cast<uint8_t>(value)),
41 static_cast<char>(static_cast<uint8_t>(value >> 8))
42 };
43 this->PutBuffer(buf);
44}
45
46/**
47 * Append binary int16 using little endian.

Callers 4

PutSint16LEMethod · 0.95
FlushMethod · 0.80
WriteLangMethod · 0.80
string_builder.cppFile · 0.80

Calls 1

PutBufferMethod · 0.45

Tested by

no test coverage detected