MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / platformByteOrder

Function platformByteOrder

source/core/StarBytes.hpp:57–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

55}
56
57inline ByteOrder platformByteOrder() {
58#if STAR_LITTLE_ENDIAN
59 return ByteOrder::LittleEndian;
60#else
61 return ByteOrder::BigEndian;
62#endif
63}
64
65inline void swapByteOrder(void* ptr, size_t len) {
66 uint8_t* data = static_cast<uint8_t*>(ptr);

Callers 2

toByteOrderFunction · 0.85
fromByteOrderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected