mirror-chatterino2/src/util/IsBigEndian.hpp

14 lines
190 B
C++
Raw Normal View History

2018-06-27 13:03:38 +02:00
#pragma once
namespace chatterino {
bool isBigEndian()
{
int test = 1;
char *p = reinterpret_cast<char *>(&test);
return p[0] == 0;
}
} // namespace chatterino