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

Function ull2Data

src/types.cpp:361–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

359}
360
361size_t ull2Data(byte* buf, uint64_t l, ByteOrder byteOrder) {
362 if (byteOrder == littleEndian) {
363 for (size_t i = 0; i < 8; i++) {
364 buf[i] = static_cast<byte>(l & 0xff);
365 l >>= 8;
366 }
367 } else {
368 for (size_t i = 0; i < 8; i++) {
369 buf[8 - i - 1] = static_cast<byte>(l & 0xff);
370 l >>= 8;
371 }
372 }
373 return 8;
374}
375
376size_t ur2Data(byte* buf, URational l, ByteOrder byteOrder) {
377 size_t o = ul2Data(buf, l.first, byteOrder);

Callers 1

write_uint64Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected