DEADSOFTWARE

Rename .ih files to module.ih for simplicity
[odcread.git] / reader / util.cc
1 #include "reader/module.ih"
3 namespace odc {
4 bool Reader::isBigEndian() { // http://stackoverflow.com/questions/1001307/detecting-endianness-programmatically-in-a-c-program
5 union {
6 uint32_t i;
7 uint8_t c[4];
8 } test = {0x01020304};
9 return test.c[0] == 1;
10 }
12 bool Reader::isLittleEndian() {
13 return !isBigEndian();
14 }
15 }