diff --git a/chatterino.pro b/chatterino.pro index 5c9dc4f70..360c11d9b 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -383,7 +383,8 @@ HEADERS += \ src/widgets/StreamView.hpp \ src/widgets/TooltipWidget.hpp \ src/widgets/Window.hpp \ - src/providers/twitch/TwitchCommon.hpp + src/providers/twitch/TwitchCommon.hpp \ + src/util/IsBigEndian.hpp RESOURCES += \ resources/resources.qrc \ diff --git a/src/Application.cpp b/src/Application.cpp index 8ab5a878e..064c79452 100644 --- a/src/Application.cpp +++ b/src/Application.cpp @@ -16,24 +16,13 @@ #include "singletons/SettingsManager.hpp" #include "singletons/ThemeManager.hpp" #include "singletons/WindowManager.hpp" +#include "util/IsBigEndian.hpp" #include "util/PostToThread.hpp" #include namespace chatterino { -namespace { - -bool isBigEndian() -{ - int test = 1; - char *p = reinterpret_cast(&test); - - return p[0] == 0; -} - -} // namespace - static std::atomic isAppConstructed{false}; static std::atomic isAppInitialized{false}; diff --git a/src/util/IsBigEndian.hpp b/src/util/IsBigEndian.hpp new file mode 100644 index 000000000..ef15dc5ef --- /dev/null +++ b/src/util/IsBigEndian.hpp @@ -0,0 +1,13 @@ +#pragma once + +namespace chatterino { + +bool isBigEndian() +{ + int test = 1; + char *p = reinterpret_cast(&test); + + return p[0] == 0; +} + +} // namespace chatterino