diff --git a/include/qpdf/ObjectHandle.hh b/include/qpdf/ObjectHandle.hh index a69f5ae..1966cd3 100644 --- a/include/qpdf/ObjectHandle.hh +++ b/include/qpdf/ObjectHandle.hh @@ -61,6 +61,13 @@ namespace qpdf // The rest of the header file is for qpdf internal use only. + // Return true if both object handles refer to the same underlying object. + bool + operator==(BaseHandle const& other) const + { + return obj == other.obj; + } + // For arrays, return the number of items in the array. // For null-like objects, return 0. // For all other objects, return 1. diff --git a/libqpdf/QPDF_Array.cc b/libqpdf/QPDF_Array.cc index 37b2c60..44c7a6d 100644 --- a/libqpdf/QPDF_Array.cc +++ b/libqpdf/QPDF_Array.cc @@ -400,7 +400,6 @@ QPDFObjectHandle::getArrayItem(int n) const return newNull(); } objectWarning("returning null for out of bounds array access"); - } else { typeWarning("array", "returning null"); }