Move buffering to Reader

This commit is contained in:
Twan van Laarhoven
2020-05-02 01:04:35 +02:00
parent 6c4277bd35
commit 6edba0c5c0
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -202,10 +202,10 @@ unique_ptr<wxInputStream> Package::openIn(const String& file) {
unique_ptr<wxInputStream> stream;
if (it != files.end() && it->second.wasWritten()) {
// written to this file, open the temp file
stream = make_unique<BufferedFileInputStream>(it->second.tempName);
stream = make_unique<wxFileInputStream>(it->second.tempName);
} else if (wxFileExists(filename+_("/")+file)) {
// a file in directory package
stream = make_unique<BufferedFileInputStream>(filename+_("/")+file);
stream = make_unique<wxFileInputStream>(filename+_("/")+file);
} else if (wxFileExists(filename) && it != files.end() && it->second.zipEntry) {
// a file in a zip archive
stream = make_unique<ZipFileInputStream>(filename, it->second.zipEntry);
+1 -1
View File
@@ -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;