aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/FileInputSource.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-10-27 15:51:41 +0100
committerJay Berkenbilt <ejb@ql.org>2020-10-27 16:57:48 +0100
commitbcea54fcaa16a7d5feff0c4cd038fea51d1359ea (patch)
tree2c0dc1076a7963c0d9ac77fc8bb87a57ef7ad964 /libqpdf/FileInputSource.cc
parent81d2c548dc619e21519651606970c21f720c8658 (diff)
downloadqpdf-bcea54fcaa16a7d5feff0c4cd038fea51d1359ea.tar.zst
Revert removal of unreadCh change for performance
Turns out unreadCh is much more efficient than seek(-1, SEEK_CUR). Update comments and code to reflect this.
Diffstat (limited to 'libqpdf/FileInputSource.cc')
-rw-r--r--libqpdf/FileInputSource.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libqpdf/FileInputSource.cc b/libqpdf/FileInputSource.cc
index 5ec6a170..cd8feda4 100644
--- a/libqpdf/FileInputSource.cc
+++ b/libqpdf/FileInputSource.cc
@@ -80,7 +80,7 @@ FileInputSource::findAndSkipNextEOL()
}
else if (! ((ch == '\r') || (ch == '\n')))
{
- this->seek(-1, SEEK_CUR);
+ this->unreadCh(ch);
done = true;
}
}