Skip to content

Commit

Permalink
Removed unused files IsBigEndian.hpp and rangealgorithm.hpp (Chatteri…
Browse files Browse the repository at this point in the history
…no#3776)

util/IsBigEndian.hpp and util/rangealgorithm.hpp have been unused for a long time, removing them from the codebase because git keeps the history forever anyway!
  • Loading branch information
zneix authored May 29, 2022
1 parent 74ec310 commit 8b98f0e
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 51 deletions.
2 changes: 0 additions & 2 deletions chatterino.pro
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@ HEADERS += \
src/util/IncognitoBrowser.hpp \
src/util/InitUpdateButton.hpp \
src/util/IrcHelpers.hpp \
src/util/IsBigEndian.hpp \
src/util/LayoutCreator.hpp \
src/util/LayoutHelper.hpp \
src/util/NuulsUploader.hpp \
Expand All @@ -536,7 +535,6 @@ HEADERS += \
src/util/PostToThread.hpp \
src/util/QObjectRef.hpp \
src/util/QStringHash.hpp \
src/util/rangealgorithm.hpp \
src/util/RapidjsonHelpers.hpp \
src/util/RapidJsonSerializeQString.hpp \
src/util/RatelimitBucket.hpp \
Expand Down
1 change: 0 additions & 1 deletion src/Application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
#include "singletons/Updates.hpp"
#include "singletons/WindowManager.hpp"
#include "util/Helpers.hpp"
#include "util/IsBigEndian.hpp"
#include "util/PostToThread.hpp"
#include "util/RapidjsonHelpers.hpp"
#include "widgets/Notebook.hpp"
Expand Down
13 changes: 0 additions & 13 deletions src/BrowserExtension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,19 +58,6 @@ namespace {

auto size = *reinterpret_cast<uint32_t *>(size_c);

#if 0
bool bigEndian = isBigEndian();
// To avoid breaking strict-aliasing rules and potentially inducing undefined behaviour, the following code can be run instead
uint32_t size = 0;
if (bigEndian) {
size = size_c[3] | static_cast<uint32_t>(size_c[2]) << 8 |
static_cast<uint32_t>(size_c[1]) << 16 | static_cast<uint32_t>(size_c[0]) << 24;
} else {
size = size_c[0] | static_cast<uint32_t>(size_c[1]) << 8 |
static_cast<uint32_t>(size_c[2]) << 16 | static_cast<uint32_t>(size_c[3]) << 24;
}
#endif

std::unique_ptr<char[]> buffer(new char[size + 1]);
std::cin.read(buffer.get(), size);
*(buffer.get() + size) = '\0';
Expand Down
13 changes: 0 additions & 13 deletions src/util/IsBigEndian.hpp

This file was deleted.

22 changes: 0 additions & 22 deletions src/util/rangealgorithm.hpp

This file was deleted.

0 comments on commit 8b98f0e

Please sign in to comment.