diff --git a/src/common/progress_callback.cpp b/src/common/progress_callback.cpp index 2d0b4b06a..eeeb94add 100644 --- a/src/common/progress_callback.cpp +++ b/src/common/progress_callback.cpp @@ -3,7 +3,6 @@ #include "progress_callback.h" #include "assert.h" -#include "byte_stream.h" #include "log.h" #include diff --git a/src/core/cheats.cpp b/src/core/cheats.cpp index ec68caa32..9d9d99a47 100644 --- a/src/core/cheats.cpp +++ b/src/core/cheats.cpp @@ -1,19 +1,20 @@ -// SPDX-FileCopyrightText: 2019-2022 Connor McLaughlin and contributors. +// SPDX-FileCopyrightText: 2019-2024 Connor McLaughlin and contributors. // SPDX-License-Identifier: (GPL-3.0 OR CC-BY-NC-ND-4.0) #include "cheats.h" #include "bus.h" -#include "common/assert.h" -#include "common/byte_stream.h" -#include "common/file_system.h" -#include "common/log.h" -#include "common/small_string.h" -#include "common/string_util.h" #include "controller.h" #include "cpu_code_cache.h" #include "cpu_core.h" #include "host.h" #include "system.h" + +#include "common/assert.h" +#include "common/file_system.h" +#include "common/log.h" +#include "common/small_string.h" +#include "common/string_util.h" + #include #include #include diff --git a/src/core/fullscreen_ui.cpp b/src/core/fullscreen_ui.cpp index 13732d1f3..3f54b0548 100644 --- a/src/core/fullscreen_ui.cpp +++ b/src/core/fullscreen_ui.cpp @@ -27,7 +27,6 @@ #include "util/input_manager.h" #include "util/postprocessing.h" -#include "common/byte_stream.h" #include "common/error.h" #include "common/file_system.h" #include "common/log.h" diff --git a/src/core/game_database.cpp b/src/core/game_database.cpp index f56c1149a..2f017b1d4 100644 --- a/src/core/game_database.cpp +++ b/src/core/game_database.cpp @@ -11,7 +11,6 @@ #include "common/assert.h" #include "common/binary_reader_writer.h" -#include "common/byte_stream.h" #include "common/error.h" #include "common/file_system.h" #include "common/heterogeneous_containers.h" diff --git a/src/core/memory_card.cpp b/src/core/memory_card.cpp index 85757f5db..73f7c4b9d 100644 --- a/src/core/memory_card.cpp +++ b/src/core/memory_card.cpp @@ -9,7 +9,6 @@ #include "util/state_wrapper.h" #include "common/bitutils.h" -#include "common/byte_stream.h" #include "common/error.h" #include "common/file_system.h" #include "common/log.h" diff --git a/src/duckstation-qt/qthost.cpp b/src/duckstation-qt/qthost.cpp index 2bf21f43d..0ab86f82a 100644 --- a/src/duckstation-qt/qthost.cpp +++ b/src/duckstation-qt/qthost.cpp @@ -25,7 +25,6 @@ #include "core/system.h" #include "common/assert.h" -#include "common/byte_stream.h" #include "common/crash_handler.h" #include "common/error.h" #include "common/file_system.h" diff --git a/src/duckstation-qt/qtutils.cpp b/src/duckstation-qt/qtutils.cpp index b1a609630..74df8b86f 100644 --- a/src/duckstation-qt/qtutils.cpp +++ b/src/duckstation-qt/qtutils.cpp @@ -6,7 +6,6 @@ #include "core/game_list.h" #include "core/system.h" -#include "common/byte_stream.h" #include "common/log.h" #include @@ -146,27 +145,6 @@ void ResizeColumnsForTreeView(QTreeView* view, const std::initializer_list& ResizeColumnsForView(view, widths); } -QByteArray ReadStreamToQByteArray(ByteStream* stream, bool rewind /*= false*/) -{ - QByteArray ret; - const u64 old_pos = stream->GetPosition(); - if (rewind && !stream->SeekAbsolute(0)) - return {}; - - const u64 stream_size = stream->GetSize() - stream->GetPosition(); - ret.resize(static_cast(stream_size)); - if (stream_size > 0 && !stream->Read2(ret.data(), static_cast(stream_size), nullptr)) - return {}; - - stream->SeekAbsolute(old_pos); - return ret; -} - -bool WriteQByteArrayToStream(QByteArray& arr, ByteStream* stream) -{ - return arr.isEmpty() || stream->Write2(arr.data(), static_cast(arr.size())); -} - void OpenURL(QWidget* parent, const QUrl& qurl) { if (!QDesktopServices::openUrl(qurl)) diff --git a/src/duckstation-qt/qtutils.h b/src/duckstation-qt/qtutils.h index 79647aa2f..2b6bb16f6 100644 --- a/src/duckstation-qt/qtutils.h +++ b/src/duckstation-qt/qtutils.h @@ -77,12 +77,6 @@ void ResizeColumnsForTreeView(QTreeView* view, const std::initializer_list& /// NOTE: Defined in QtKeyCodes.cpp, not QtUtils.cpp. u32 KeyEventToCode(const QKeyEvent* ev); -/// Reads a whole stream to a Qt byte array. -QByteArray ReadStreamToQByteArray(ByteStream* stream, bool rewind = false); - -/// Creates a stream from a Qt byte array. -bool WriteQByteArrayToStream(QByteArray& arr, ByteStream* stream); - /// Opens a URL with the default handler. void OpenURL(QWidget* parent, const QUrl& qurl); diff --git a/src/util/image.cpp b/src/util/image.cpp index 6200f2edf..336ea6ab8 100644 --- a/src/util/image.cpp +++ b/src/util/image.cpp @@ -4,7 +4,6 @@ #include "image.h" #include "common/bitutils.h" -#include "common/byte_stream.h" #include "common/fastjmp.h" #include "common/file_system.h" #include "common/log.h"