aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-09-13 17:18:49 +0200
committerJay Berkenbilt <ejb@ql.org>2022-09-13 17:18:49 +0200
commit31b2cfbb79e0222f666ce3eaec740ed7f225c4a9 (patch)
tree39f86574bbf0b0a1333c41076c054ec7611ddbb9
parent62833ac74ff66347a667fe625b4b98ebb3136b8c (diff)
downloadqpdf-31b2cfbb79e0222f666ce3eaec740ed7f225c4a9.tar.zst
Fix up a few comments
-rw-r--r--include/qpdf/QPDF.hh4
-rw-r--r--libqpdf/QPDF.cc7
2 files changed, 4 insertions, 7 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index ea2ca05c..1e3d4c34 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -875,8 +875,8 @@ class QPDF
};
friend class Resolver;
- // ParseGuard class allows QPDFObjectHandle to detect re-entrant
- // resolution
+ // The ParseGuard class allows QPDFObjectHandle to detect
+ // re-entrant parsing.
class ParseGuard
{
friend class QPDFParser;
diff --git a/libqpdf/QPDF.cc b/libqpdf/QPDF.cc
index 8c5e8e13..06a7fba1 100644
--- a/libqpdf/QPDF.cc
+++ b/libqpdf/QPDF.cc
@@ -1947,9 +1947,6 @@ QPDF::resolve(QPDFObjGen const& og)
return;
}
- // Check object cache before checking xref table. This allows us
- // to insert things into the object cache that don't actually
- // exist in the file.
if (this->m->resolving.count(og)) {
// This can happen if an object references itself directly or
// indirectly in some key that has to be resolved during
@@ -2558,8 +2555,8 @@ QPDF::swapObjects(int objid1, int generation1, int objid2, int generation2)
void
QPDF::swapObjects(QPDFObjGen const& og1, QPDFObjGen const& og2)
{
- // Force objects to be loaded into cache; then swap them in the
- // cache.
+ // Force objects to be read from the input source if needed, then
+ // swap them in the cache.
resolve(og1);
resolve(og2);
m->obj_cache[og1].object->swapWith(m->obj_cache[og2].object);