mirror-chatterino2/src/util/IsBigEndian.hpp

14 lines
177 B
C++
Raw Normal View History

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