From 6edba0c5c01119e94413bcd4f339d0acfb0f9ea2 Mon Sep 17 00:00:00 2001 From: Twan van Laarhoven Date: Sat, 2 May 2020 01:04:35 +0200 Subject: [PATCH] Move buffering to Reader --- src/util/io/package.cpp | 4 ++-- src/util/io/reader.hpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/io/package.cpp b/src/util/io/package.cpp index 9cb23451..977214a7 100644 --- a/src/util/io/package.cpp +++ b/src/util/io/package.cpp @@ -202,10 +202,10 @@ unique_ptr Package::openIn(const String& file) { unique_ptr stream; if (it != files.end() && it->second.wasWritten()) { // written to this file, open the temp file - stream = make_unique(it->second.tempName); + stream = make_unique(it->second.tempName); } else if (wxFileExists(filename+_("/")+file)) { // a file in directory package - stream = make_unique(filename+_("/")+file); + stream = make_unique(filename+_("/")+file); } else if (wxFileExists(filename) && it != files.end() && it->second.zipEntry) { // a file in a zip archive stream = make_unique(filename, it->second.zipEntry); diff --git a/src/util/io/reader.hpp b/src/util/io/reader.hpp index 9f54edc6..c2eda096 100644 --- a/src/util/io/reader.hpp +++ b/src/util/io/reader.hpp @@ -145,7 +145,7 @@ private: /// Line number of the previous_line int previous_line_number; /// Input stream we are reading from - wxInputStream& input; + wxBufferedInputStream input; /// Accumulated warning messages String warnings;