diff --git a/Emulator/Base/CoreComponent.cpp b/Emulator/Base/CoreComponent.cpp index db3717e20..a967c2e76 100755 --- a/Emulator/Base/CoreComponent.cpp +++ b/Emulator/Base/CoreComponent.cpp @@ -133,17 +133,6 @@ CoreComponent::getFallback(Option opt) const return emulator.defaults.get(opt); } -void -CoreComponent::routeOption(Option opt, std::vector &result) -{ - for (auto &o : getOptions()) { - if (o == opt) result.push_back(this); - } - for (auto &c : subComponents) { - c->routeOption(opt, result); - } -} - Configurable * CoreComponent::routeOption(Option opt, isize objid) { diff --git a/Emulator/Base/CoreComponent.h b/Emulator/Base/CoreComponent.h index 6bea3ea31..2d1dec507 100755 --- a/Emulator/Base/CoreComponent.h +++ b/Emulator/Base/CoreComponent.h @@ -120,7 +120,6 @@ public CoreObject, public Serializable, public Suspendable, public Synchronizabl virtual void resetConfig(); // Returns the target component for a given configuration option - [[deprecated]] void routeOption(Option opt, std::vector &result); Configurable *routeOption(Option opt, isize objid); // Returns the fallback value for a config option diff --git a/Emulator/Media/AnyFile.h b/Emulator/Media/AnyFile.h index e766f5d41..07ebc2706 100644 --- a/Emulator/Media/AnyFile.h +++ b/Emulator/Media/AnyFile.h @@ -132,7 +132,6 @@ class AnyFile : public CoreObject, public MediaFile { virtual bool isCompatiblePath(const fs::path &path) = 0; virtual bool isCompatibleBuffer(const u8 *buf, isize len) = 0; bool isCompatibleBuffer(const Buffer &buffer); - [[deprecated]] virtual bool isCompatibleStream(std::istream &stream) = 0; isize readFromBuffer(const u8 *buf, isize len) throws override; isize readFromBuffer(const Buffer &buffer) throws; diff --git a/Emulator/Media/CRTFile.cpp b/Emulator/Media/CRTFile.cpp index 59c834d35..211ee0235 100644 --- a/Emulator/Media/CRTFile.cpp +++ b/Emulator/Media/CRTFile.cpp @@ -31,12 +31,6 @@ CRTFile::isCompatible(const fs::path &path) return s == ".CRT"; } -bool -CRTFile::isCompatible(std::istream &stream) -{ - return util::matchingStreamHeader(stream, "C64 CARTRIDGE "); -} - bool CRTFile::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/CRTFile.h b/Emulator/Media/CRTFile.h index 2e14264d0..08c11fd82 100644 --- a/Emulator/Media/CRTFile.h +++ b/Emulator/Media/CRTFile.h @@ -44,7 +44,6 @@ class CRTFile : public AnyFile { static string cartridgeTypeName(CartridgeType type); static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -69,7 +68,6 @@ class CRTFile : public AnyFile { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_CRT; } PETName<16> getName() const override; diff --git a/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp b/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp index 8856cdd92..4ba407ee4 100644 --- a/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp +++ b/Emulator/Media/Cartridges/CustomCartridges/Reu.cpp @@ -471,46 +471,6 @@ Reu::processEvent(EventID id) } } -void -Reu::stash(isize len) -{ - debug(REU_DEBUG, "stash(%x,%x,%ld)\n", c64Addr, reuAddr, len); - - // Perform DMA - for (isize i = 0; i < len; i++) doDma(EXP_REU_STASH); - finalizeDma(EXP_REU_STASH); -} - -void -Reu::fetch(isize len) -{ - debug(REU_DEBUG, "fetch(%x,%x,%ld)\n", c64Addr, reuAddr, len); - - // Perform DMA - for (isize i = 0; i < len; i++) doDma(EXP_REU_FETCH); - finalizeDma(EXP_REU_FETCH); -} - -void -Reu::swap(isize len) -{ - debug(REU_DEBUG, "swap(%x,%x,%ld)\n", c64Addr, reuAddr, len); - - // Perform DMA - for (isize i = 0; i < len; i++) doDma(EXP_REU_SWAP); - finalizeDma(EXP_REU_SWAP); -} - -void -Reu::verify(isize len) -{ - debug(REU_DEBUG, "verify(%x,%x,%ld)\n", c64Addr, reuAddr, len); - - // Perform DMA - for (isize i = 0; i < len; i++) if (!doDma(EXP_REU_VERIFY)) break; - finalizeDma(EXP_REU_VERIFY); -} - void Reu::triggerEndOfBlockIrq() { diff --git a/Emulator/Media/Cartridges/CustomCartridges/Reu.h b/Emulator/Media/Cartridges/CustomCartridges/Reu.h index 343af4429..3e90637d2 100644 --- a/Emulator/Media/Cartridges/CustomCartridges/Reu.h +++ b/Emulator/Media/Cartridges/CustomCartridges/Reu.h @@ -222,13 +222,7 @@ class Reu final : public Cartridge { bool doDma(EventID id); void finalizeDma(EventID id); - // [[deprecated]] void doDma(); - [[deprecated]] void stash(isize len); - [[deprecated]] void fetch(isize len); - [[deprecated]] void swap(isize len); - [[deprecated]] void verify(isize len); - - + // // Processing events // diff --git a/Emulator/Media/D64File.cpp b/Emulator/Media/D64File.cpp index 673b35c34..92fec660c 100644 --- a/Emulator/Media/D64File.cpp +++ b/Emulator/Media/D64File.cpp @@ -23,20 +23,6 @@ D64File::isCompatible(const fs::path &path) return s == ".D64"; } -bool -D64File::isCompatible(std::istream &stream) -{ - isize len = util::streamLength(stream); - - return - len == D64_683_SECTORS || - len == D64_683_SECTORS_ECC || - len == D64_768_SECTORS || - len == D64_768_SECTORS_ECC || - len == D64_802_SECTORS || - len == D64_802_SECTORS_ECC; -} - bool D64File::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/D64File.h b/Emulator/Media/D64File.h index 75eec5bc2..829c4ea07 100755 --- a/Emulator/Media/D64File.h +++ b/Emulator/Media/D64File.h @@ -33,7 +33,6 @@ class D64File : public AnyFile { u8 errors[802]; static bool isCompatible(const fs::path &name); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -69,7 +68,6 @@ class D64File : public AnyFile { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_D64; } PETName<16> getName() const override; diff --git a/Emulator/Media/Folder.h b/Emulator/Media/Folder.h index 8f8530899..4e1ee17a0 100644 --- a/Emulator/Media/Folder.h +++ b/Emulator/Media/Folder.h @@ -52,7 +52,6 @@ class Folder : public AnyCollection { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_FOLDER; } diff --git a/Emulator/Media/G64File.cpp b/Emulator/Media/G64File.cpp index ebcbdc2a1..a3f8de7d6 100755 --- a/Emulator/Media/G64File.cpp +++ b/Emulator/Media/G64File.cpp @@ -24,16 +24,6 @@ G64File::isCompatible(const fs::path &path) return s == ".G64"; } -bool -G64File::isCompatible(std::istream &stream) -{ - // const u8 magicBytes[] = { 0x47, 0x43, 0x52, 0x2D, 0x31, 0x35, 0x34, 0x31 }; - const u8 magicBytes[] = { 'G', 'C', 'R', '-', '1', '5', '4', '1' }; - - if (util::streamLength(stream) < 0x2AC) return false; - return util::matchingStreamHeader(stream, magicBytes, sizeof(magicBytes)); -} - bool G64File::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/G64File.h b/Emulator/Media/G64File.h index 3a1489f5c..329c746a3 100644 --- a/Emulator/Media/G64File.h +++ b/Emulator/Media/G64File.h @@ -26,7 +26,6 @@ class G64File : public AnyFile { // static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -61,7 +60,6 @@ class G64File : public AnyFile { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_G64; } diff --git a/Emulator/Media/P00File.cpp b/Emulator/Media/P00File.cpp index b3ef64a9c..6e490741a 100755 --- a/Emulator/Media/P00File.cpp +++ b/Emulator/Media/P00File.cpp @@ -24,15 +24,6 @@ P00File::isCompatible(const fs::path &path) return s == ".P00"; } -bool -P00File::isCompatible(std::istream &stream) -{ - const u8 magicBytes[] = { 0x43, 0x36, 0x34, 0x46, 0x69, 0x6C, 0x65 }; - - if (util::streamLength(stream) < 0x1A) return false; - return util::matchingStreamHeader(stream, magicBytes, sizeof(magicBytes)); -} - bool P00File::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/P00File.h b/Emulator/Media/P00File.h index e8035c671..5eeb29e89 100755 --- a/Emulator/Media/P00File.h +++ b/Emulator/Media/P00File.h @@ -21,7 +21,6 @@ class P00File : public AnyCollection { public: static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -54,7 +53,6 @@ class P00File : public AnyCollection { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_P00; } PETName<16> getName() const override; diff --git a/Emulator/Media/PRGFile.cpp b/Emulator/Media/PRGFile.cpp index 8884a569b..5cad6ed36 100755 --- a/Emulator/Media/PRGFile.cpp +++ b/Emulator/Media/PRGFile.cpp @@ -24,12 +24,6 @@ PRGFile::isCompatible(const fs::path &path) return s == ".PRG"; } -bool -PRGFile::isCompatible(std::istream &stream) -{ - return (util::streamLength(stream) >= 2); -} - bool PRGFile::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/PRGFile.h b/Emulator/Media/PRGFile.h index a0f83d7c6..174a9a3f7 100755 --- a/Emulator/Media/PRGFile.h +++ b/Emulator/Media/PRGFile.h @@ -25,7 +25,6 @@ class PRGFile : public AnyCollection { // static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -58,7 +57,6 @@ class PRGFile : public AnyCollection { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_PRG; } diff --git a/Emulator/Media/RomFile.cpp b/Emulator/Media/RomFile.cpp index 4da0b9e92..f82de3629 100644 --- a/Emulator/Media/RomFile.cpp +++ b/Emulator/Media/RomFile.cpp @@ -51,16 +51,6 @@ RomFile::isCompatible(const fs::path &path) return true; } -bool -RomFile::isCompatible(std::istream &stream) -{ - return - isBasicRomStream(stream) || - isCharRomStream(stream) || - isKernalRomStream(stream) || - isVC1541RomStream(stream); -} - bool RomFile::isCompatible(const u8 *buf, isize len) { @@ -77,84 +67,6 @@ RomFile::isCompatible(const Buffer &buf) return isCompatible(buf.ptr, buf.size); } -bool -RomFile::isRomStream(RomType type, std::istream &is) -{ - isize size = util::streamLength(is); - - for (isize i = 0; signatures[i].size != 0; i++) { - - // Only proceed if the file type matches - if (signatures[i].type != type) continue; - - // Only proceed if the file size matches - if (signatures[i].size != size) continue; - - // Only proceed if the matches bytes matche - if (!util::matchingStreamHeader(is, signatures[i].magic, 3, signatures[i].offset)) - continue; - - return true; - } - - return false; -} - -bool -RomFile::isBasicRomStream(std::istream &is) -{ - return isRomStream(ROM_TYPE_BASIC, is); -} - -bool -RomFile::isCharRomStream(std::istream &is) -{ - return isRomStream(ROM_TYPE_CHAR, is); -} - -bool -RomFile::isKernalRomStream(std::istream &is) -{ - return isRomStream(ROM_TYPE_KERNAL, is); -} - -bool -RomFile::isVC1541RomStream(std::istream &is) -{ - return isRomStream(ROM_TYPE_VC1541, is); -} - -bool -RomFile::isRomFile(RomType type, const fs::path &path) -{ - std::ifstream stream(path); - return isRomStream(type, stream); -} - -bool -RomFile::isBasicRomFile(const fs::path &path) -{ - return isRomFile(ROM_TYPE_BASIC, path); -} - -bool -RomFile::isCharRomFile(const fs::path &path) -{ - return isRomFile(ROM_TYPE_CHAR, path); -} - -bool -RomFile::isKernalRomFile(const fs::path &path) -{ - return isRomFile(ROM_TYPE_KERNAL, path); -} - -bool -RomFile::isVC1541RomFile(const fs::path &path) -{ - return isRomFile(ROM_TYPE_VC1541, path); -} - bool RomFile::isRomBuffer(RomType type, const u8 *buf, isize len) { diff --git a/Emulator/Media/RomFile.h b/Emulator/Media/RomFile.h index 4151404c9..95532ef02 100644 --- a/Emulator/Media/RomFile.h +++ b/Emulator/Media/RomFile.h @@ -37,22 +37,9 @@ class RomFile : public AnyFile { // static bool isCompatible(const fs::path &name); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); - [[deprecated]] static bool isRomStream(RomType type, std::istream &stream); - [[deprecated]] static bool isBasicRomStream(std::istream &stream); - [[deprecated]] static bool isCharRomStream(std::istream &stream); - [[deprecated]] static bool isKernalRomStream(std::istream &stream); - [[deprecated]] static bool isVC1541RomStream(std::istream &stream); - - [[deprecated]] static bool isRomFile(RomType type, const fs::path &path); - [[deprecated]] static bool isBasicRomFile(const fs::path &path); - [[deprecated]] static bool isCharRomFile(const fs::path &path); - [[deprecated]] static bool isKernalRomFile(const fs::path &path); - [[deprecated]] static bool isVC1541RomFile(const fs::path &path); - static bool isRomBuffer(RomType type, const u8 *buf, isize len); static bool isBasicRomBuffer(const u8 *buf, isize len); static bool isCharRomBuffer(const u8 *buf, isize len); @@ -87,7 +74,6 @@ class RomFile : public AnyFile { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return romFileType; } void finalizeRead() override; diff --git a/Emulator/Media/Script.cpp b/Emulator/Media/Script.cpp index 576d82c09..86986f858 100644 --- a/Emulator/Media/Script.cpp +++ b/Emulator/Media/Script.cpp @@ -26,12 +26,6 @@ Script::isCompatible(const fs::path &path) return s == ".INI"; } -bool -Script::isCompatible(std::istream &stream) -{ - return true; -} - bool Script::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/Script.h b/Emulator/Media/Script.h index b292bf96d..b1a8a1b96 100644 --- a/Emulator/Media/Script.h +++ b/Emulator/Media/Script.h @@ -27,7 +27,6 @@ class Script : public AnyFile { // static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -57,7 +56,6 @@ class Script : public AnyFile { public: bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_SCRIPT; } }; diff --git a/Emulator/Media/Snapshot.cpp b/Emulator/Media/Snapshot.cpp index 82d837b1b..f77a54b29 100644 --- a/Emulator/Media/Snapshot.cpp +++ b/Emulator/Media/Snapshot.cpp @@ -56,13 +56,6 @@ Snapshot::isCompatible(const fs::path &path) return true; } -bool -Snapshot::isCompatible(std::istream &stream) -{ - if (util::streamLength(stream) < 0x15) return false; - return util::matchingStreamHeader(stream, "VC64"); -} - bool Snapshot::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/Snapshot.h b/Emulator/Media/Snapshot.h index fb2ae3795..ea22853fe 100644 --- a/Emulator/Media/Snapshot.h +++ b/Emulator/Media/Snapshot.h @@ -64,7 +64,6 @@ class Snapshot : public AnyFile { // static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -93,7 +92,6 @@ class Snapshot : public AnyFile { FileType type() const override { return FILETYPE_SNAPSHOT; } bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } void finalizeRead() throws override; diff --git a/Emulator/Media/T64File.cpp b/Emulator/Media/T64File.cpp index 466f2e81b..f0451bc49 100755 --- a/Emulator/Media/T64File.cpp +++ b/Emulator/Media/T64File.cpp @@ -25,23 +25,6 @@ T64File::isCompatible(const fs::path &path) return s == ".T64"; } -bool -T64File::isCompatible(std::istream &stream) -{ - const string magicT64 = "C64"; - const string magicTAP = "C64-TAPE"; - - if (util::streamLength(stream) < 0x40) return false; - - // T64 files must begin with "C64" - if (!util::matchingStreamHeader(stream, magicT64)) return false; - - // T64 files must *not* begin with "C64-TAPE" (which is used by TAP files) - if (util::matchingStreamHeader(stream, magicTAP)) return false; - - return true; -} - bool T64File::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/T64File.h b/Emulator/Media/T64File.h index 4a101edb6..fa9433aae 100755 --- a/Emulator/Media/T64File.h +++ b/Emulator/Media/T64File.h @@ -21,7 +21,6 @@ class T64File : public AnyCollection { public: static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -56,7 +55,6 @@ class T64File : public AnyCollection { FileType type() const override { return FILETYPE_T64; } PETName<16> getName() const override; bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } void finalizeRead() override; diff --git a/Emulator/Media/TAPFile.cpp b/Emulator/Media/TAPFile.cpp index 76bbfe60a..3e7fa3330 100644 --- a/Emulator/Media/TAPFile.cpp +++ b/Emulator/Media/TAPFile.cpp @@ -24,12 +24,6 @@ TAPFile::isCompatible(const fs::path &path) return s == ".TAP" || s == ".T64"; } -bool -TAPFile::isCompatible(std::istream &stream) -{ - return util::matchingStreamHeader(stream, "C64-TAPE-RAW"); -} - bool TAPFile::isCompatible(const u8 *buf, isize len) { diff --git a/Emulator/Media/TAPFile.h b/Emulator/Media/TAPFile.h index 00af278ef..a5682a6d2 100644 --- a/Emulator/Media/TAPFile.h +++ b/Emulator/Media/TAPFile.h @@ -28,7 +28,6 @@ class TAPFile : public AnyFile { // static bool isCompatible(const fs::path &path); - [[deprecated]] static bool isCompatible(std::istream &stream); static bool isCompatible(const u8 *buf, isize len); static bool isCompatible(const Buffer &buffer); @@ -53,7 +52,6 @@ class TAPFile : public AnyFile { // bool isCompatiblePath(const fs::path &path) override { return isCompatible(path); } - [[deprecated]] bool isCompatibleStream(std::istream &stream) override { return isCompatible(stream); } bool isCompatibleBuffer(const u8 *buf, isize len) override { return isCompatible(buf, len); } FileType type() const override { return FILETYPE_TAP; } PETName<16> getName() const override; diff --git a/Emulator/Utilities/Buffer.cpp b/Emulator/Utilities/Buffer.cpp index 7b88e6ecc..40876b7e2 100644 --- a/Emulator/Utilities/Buffer.cpp +++ b/Emulator/Utilities/Buffer.cpp @@ -130,21 +130,6 @@ Allocator::init(const std::filesystem::path &path) // Call the proper init delegate init(sstr.str()); - - /* - // Get the stream length in bytes - auto length = streamLength(stream); - - // Create a buffer of proper size - if (length % sizeof(T)) { - init(length / sizeof(T) + 1); - } else { - alloc(length / sizeof(T)); - } - - // Read from stream - stream.read((char *)ptr, length); - */ } template void diff --git a/Emulator/Utilities/IOUtils.cpp b/Emulator/Utilities/IOUtils.cpp index 93cbe6a97..d2dd5a0e9 100644 --- a/Emulator/Utilities/IOUtils.cpp +++ b/Emulator/Utilities/IOUtils.cpp @@ -192,20 +192,6 @@ bool matchingBufferHeader(const u8 *buf, const string &header, isize offset) return matchingBufferHeader(buf, blen, header, offset); } -isize -streamLength(std::istream &stream) -{ - auto cur = stream.tellg(); - stream.seekg(0, std::ios::beg); - auto beg = stream.tellg(); - stream.seekg(0, std::ios::end); - auto end = stream.tellg(); - stream.seekg(cur, std::ios::beg); - - printf("stream length: %d %d %d\n", int(cur), int(beg), int(end)); - return (isize)(end - beg); -} - void sprint8d(char *s, u8 value) { diff --git a/Emulator/Utilities/IOUtils.h b/Emulator/Utilities/IOUtils.h index ead7edca6..66979e7f9 100644 --- a/Emulator/Utilities/IOUtils.h +++ b/Emulator/Utilities/IOUtils.h @@ -85,8 +85,6 @@ void sprint16b(char *s, u16 value); // Handling streams // -[[deprecated]] isize streamLength(std::istream &stream); - struct dec { i64 value;