From 008364a9a4b1bd58c964151c7dc1db0a83c9b70c Mon Sep 17 00:00:00 2001 From: m-holger Date: Sun, 4 Dec 2022 14:36:34 +0000 Subject: [PATCH] Remove redundant friend class statements --- include/qpdf/QPDF.hh | 6 ------ include/qpdf/QPDFJob.hh | 1 - include/qpdf/QPDFObjectHandle.hh | 3 --- include/qpdf/QPDFOutlineDocumentHelper.hh | 1 - include/qpdf/QPDFOutlineObjectHelper.hh | 1 - include/qpdf/QPDFWriter.hh | 1 - 6 files changed, 13 deletions(-) diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh index eb3bf2e2..7cec14d2 100644 --- a/include/qpdf/QPDF.hh +++ b/include/qpdf/QPDF.hh @@ -886,7 +886,6 @@ class QPDF qpdf->resolve(og); } }; - friend class Resolver; // StreamCopier class is restricted to QPDFObjectHandle so it can // copy stream data. @@ -904,7 +903,6 @@ class QPDF qpdf->copyStreamData(dest, src); } }; - friend class Resolver; // The ParseGuard class allows QPDFObjectHandle to detect // re-entrant parsing. @@ -928,7 +926,6 @@ class QPDF } QPDF* qpdf; }; - friend class ParseGuard; // Pipe class is restricted to QPDF_Stream class Pipe @@ -957,7 +954,6 @@ class QPDF will_retry); } }; - friend class Pipe; // For testing only -- do not add to DLL static bool test_json_validators(); @@ -1106,7 +1102,6 @@ class QPDF QPDF* qpdf; std::set::const_iterator iter; }; - friend class ResolveRecorder; class JSONReactor: public JSON::Reactor { @@ -1173,7 +1168,6 @@ class QPDF std::vector object_stack; std::set reserved; }; - friend class JSONReactor; void parse(char const* password); void inParse(bool); diff --git a/include/qpdf/QPDFJob.hh b/include/qpdf/QPDFJob.hh index 2d552f64..b12c052a 100644 --- a/include/qpdf/QPDFJob.hh +++ b/include/qpdf/QPDFJob.hh @@ -382,7 +382,6 @@ class QPDFJob } QPDFJob& o; }; - friend class Config; // Return a top-level configuration item. See CONFIGURATION above // for details. If an invalid configuration is created (such as diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index bf0da746..cfd19ea9 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -1504,7 +1504,6 @@ class QPDFObjectHandle return QPDFObjectHandle(obj); } }; - friend class Factory; // Accessor for raw underlying object -- only QPDF is allowed to // call this. @@ -1533,7 +1532,6 @@ class QPDFObjectHandle return oh.asStream(); } }; - friend class ObjAccessor; // Provide access to specific classes for recursive // disconnected(). @@ -1550,7 +1548,6 @@ class QPDFObjectHandle o.disconnect(); } }; - friend class Resetter; // Convenience routine: Throws if the assumption is violated. Your // code will be better if you call one of the isType methods and diff --git a/include/qpdf/QPDFOutlineDocumentHelper.hh b/include/qpdf/QPDFOutlineDocumentHelper.hh index 28328c71..bbbc2a63 100644 --- a/include/qpdf/QPDFOutlineDocumentHelper.hh +++ b/include/qpdf/QPDFOutlineDocumentHelper.hh @@ -76,7 +76,6 @@ class QPDFOutlineDocumentHelper: public QPDFDocumentHelper return dh.checkSeen(og); } }; - friend class Accessor; private: bool checkSeen(QPDFObjGen const& og); diff --git a/include/qpdf/QPDFOutlineObjectHelper.hh b/include/qpdf/QPDFOutlineObjectHelper.hh index 6c91909c..11010a9b 100644 --- a/include/qpdf/QPDFOutlineObjectHelper.hh +++ b/include/qpdf/QPDFOutlineObjectHelper.hh @@ -93,7 +93,6 @@ class QPDFOutlineObjectHelper: public QPDFObjectHelper return QPDFOutlineObjectHelper(oh, dh, depth); } }; - friend class Accessor; private: QPDF_DLL diff --git a/include/qpdf/QPDFWriter.hh b/include/qpdf/QPDFWriter.hh index 040f3eba..a9d60672 100644 --- a/include/qpdf/QPDFWriter.hh +++ b/include/qpdf/QPDFWriter.hh @@ -550,7 +550,6 @@ class QPDFWriter std::shared_ptr* bp; std::string stack_id; }; - friend class PipelinePopper; unsigned int bytesNeeded(long long n); void writeBinary(unsigned long long val, unsigned int bytes);