moved IsBigEndian into it's own file
This commit is contained in:
+2
-1
@@ -383,7 +383,8 @@ HEADERS += \
|
|||||||
src/widgets/StreamView.hpp \
|
src/widgets/StreamView.hpp \
|
||||||
src/widgets/TooltipWidget.hpp \
|
src/widgets/TooltipWidget.hpp \
|
||||||
src/widgets/Window.hpp \
|
src/widgets/Window.hpp \
|
||||||
src/providers/twitch/TwitchCommon.hpp
|
src/providers/twitch/TwitchCommon.hpp \
|
||||||
|
src/util/IsBigEndian.hpp
|
||||||
|
|
||||||
RESOURCES += \
|
RESOURCES += \
|
||||||
resources/resources.qrc \
|
resources/resources.qrc \
|
||||||
|
|||||||
+1
-12
@@ -16,24 +16,13 @@
|
|||||||
#include "singletons/SettingsManager.hpp"
|
#include "singletons/SettingsManager.hpp"
|
||||||
#include "singletons/ThemeManager.hpp"
|
#include "singletons/ThemeManager.hpp"
|
||||||
#include "singletons/WindowManager.hpp"
|
#include "singletons/WindowManager.hpp"
|
||||||
|
#include "util/IsBigEndian.hpp"
|
||||||
#include "util/PostToThread.hpp"
|
#include "util/PostToThread.hpp"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
namespace chatterino {
|
namespace chatterino {
|
||||||
|
|
||||||
namespace {
|
|
||||||
|
|
||||||
bool isBigEndian()
|
|
||||||
{
|
|
||||||
int test = 1;
|
|
||||||
char *p = reinterpret_cast<char *>(&test);
|
|
||||||
|
|
||||||
return p[0] == 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
|
||||||
|
|
||||||
static std::atomic<bool> isAppConstructed{false};
|
static std::atomic<bool> isAppConstructed{false};
|
||||||
static std::atomic<bool> isAppInitialized{false};
|
static std::atomic<bool> isAppInitialized{false};
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,13 @@
|
|||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace chatterino {
|
||||||
|
|
||||||
|
bool isBigEndian()
|
||||||
|
{
|
||||||
|
int test = 1;
|
||||||
|
char *p = reinterpret_cast<char *>(&test);
|
||||||
|
|
||||||
|
return p[0] == 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // namespace chatterino
|
||||||
Reference in New Issue
Block a user