MCPcopy Create free account
hub / github.com/Exiv2/exiv2 / s2Data

Function s2Data

src/types.cpp:382–391  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

380}
381
382size_t s2Data(byte* buf, int16_t s, ByteOrder byteOrder) {
383 if (byteOrder == littleEndian) {
384 buf[0] = static_cast<byte>(s & 0x00ffU);
385 buf[1] = static_cast<byte>((s & 0xff00U) >> 8);
386 } else {
387 buf[0] = static_cast<byte>((s & 0xff00U) >> 8);
388 buf[1] = static_cast<byte>(s & 0x00ffU);
389 }
390 return 2;
391}
392
393size_t l2Data(byte* buf, int32_t l, ByteOrder byteOrder) {
394 if (byteOrder == littleEndian) {

Callers 1

toDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected