From b66392653871f834d7b78aa423ca279e4828951a Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Thu, 1 Sep 2022 17:39:52 -0400 Subject: Remove QPDFObject::object_type_e as alias for qpdf_object_type_e --- include/qpdf/Constants.h | 6 ++---- include/qpdf/QPDFObject.hh | 28 +--------------------------- include/qpdf/QPDFObjectHandle.hh | 2 +- 3 files changed, 4 insertions(+), 32 deletions(-) (limited to 'include') diff --git a/include/qpdf/Constants.h b/include/qpdf/Constants.h index cf6bdaef..006ff20e 100644 --- a/include/qpdf/Constants.h +++ b/include/qpdf/Constants.h @@ -61,9 +61,8 @@ enum qpdf_error_code_e { * may be added to the list, so code that switches on these values * should take that into consideration. (Maintainer note: it would be * better to call this qpdf_ot_* rather than ot_* to reduce likelihood - * of name collision, but since QPDFObject::object_type_e is an alias - * to this type, changing the names of the values breaks backward - * compatibility.) + * of name collision, but changing the names of the values breaks + * backward compatibility.) */ enum qpdf_object_type_e { /* Object types internal to qpdf */ @@ -84,7 +83,6 @@ enum qpdf_object_type_e { ot_inlineimage, /* Object types internal to qpdf */ ot_unresolved, - /* NOTE: if adding to this list, update QPDFObject.hh */ }; /* Write Parameters. See QPDFWriter.hh for details. */ diff --git a/include/qpdf/QPDFObject.hh b/include/qpdf/QPDFObject.hh index e6d1d18b..310b2c2c 100644 --- a/include/qpdf/QPDFObject.hh +++ b/include/qpdf/QPDFObject.hh @@ -38,32 +38,6 @@ class QPDFObject friend class QPDFValue; public: - // Objects derived from QPDFObject are accessible through - // QPDFObjectHandle. Each object returns a unique type code that - // has one of the valid qpdf_object_type_e values. As new object - // types are added to qpdf, additional items may be added to the - // list, so code that switches on these values should take that - // into consideration. - - // Prior to qpdf 10.5, qpdf_object_type_e was - // QPDFObject::object_type_e but was moved to make it accessible - // to the C API. The code below is for backward compatibility. - typedef enum qpdf_object_type_e object_type_e; - static constexpr object_type_e ot_uninitialized = ::ot_uninitialized; - static constexpr object_type_e ot_reserved = ::ot_reserved; - static constexpr object_type_e ot_null = ::ot_null; - static constexpr object_type_e ot_boolean = ::ot_boolean; - static constexpr object_type_e ot_integer = ::ot_integer; - static constexpr object_type_e ot_real = ::ot_real; - static constexpr object_type_e ot_string = ::ot_string; - static constexpr object_type_e ot_name = ::ot_name; - static constexpr object_type_e ot_array = ::ot_array; - static constexpr object_type_e ot_dictionary = ::ot_dictionary; - static constexpr object_type_e ot_stream = ::ot_stream; - static constexpr object_type_e ot_operator = ::ot_operator; - static constexpr object_type_e ot_inlineimage = ::ot_inlineimage; - static constexpr object_type_e ot_unresolved = ::ot_unresolved; - QPDFObject() = default; virtual ~QPDFObject() = default; @@ -84,7 +58,7 @@ class QPDFObject } // Return a unique type code for the object - object_type_e + qpdf_object_type_e getTypeCode() const { return value->type_code; diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh index 16e8dc8b..02f83363 100644 --- a/include/qpdf/QPDFObjectHandle.hh +++ b/include/qpdf/QPDFObjectHandle.hh @@ -338,7 +338,7 @@ class QPDFObjectHandle // useful for doing rapid type tests (like switch statements) or // for testing and debugging. QPDF_DLL - QPDFObject::object_type_e getTypeCode(); + qpdf_object_type_e getTypeCode(); QPDF_DLL char const* getTypeName(); -- cgit v1.2.3-54-g00ecf