mirror-chatterino2/src/util/IsBigEndian.hpp
2019-09-08 22:27:57 +02:00

14 lines
177 B
C++

#pragma once
namespace chatterino {
bool isBigEndian()
{
int test = 1;
char *p = reinterpret_cast<char *>(&test);
return p[0] == 0;
}
} // namespace chatterino