mirror of
https://github.com/qpdf/qpdf.git
synced 2025-02-07 14:18:24 +00:00
Run format-code
This commit is contained in:
parent
c810f0f21e
commit
a603c1e395
@ -1466,7 +1466,7 @@ class QPDFObjectHandle
|
||||
{
|
||||
if (!o.dereference()) {
|
||||
throw std::logic_error("attempted to dereference an"
|
||||
" uninitialized QPDFObjectHandle");
|
||||
" uninitialized QPDFObjectHandle");
|
||||
};
|
||||
return o.obj;
|
||||
}
|
||||
|
@ -284,8 +284,8 @@ QPDFObjectHandle::isInitialized() const
|
||||
QPDFObject::object_type_e
|
||||
QPDFObjectHandle::getTypeCode()
|
||||
{
|
||||
return dereference() ?
|
||||
this->obj->getTypeCode() : QPDFObject::ot_uninitialized;
|
||||
return dereference() ? this->obj->getTypeCode()
|
||||
: QPDFObject::ot_uninitialized;
|
||||
}
|
||||
|
||||
char const*
|
||||
@ -407,8 +407,7 @@ QPDFObjectHandle::isArray()
|
||||
bool
|
||||
QPDFObjectHandle::isDictionary()
|
||||
{
|
||||
return dereference() &&
|
||||
QPDFObjectTypeAccessor<QPDF_Dictionary>::check(obj);
|
||||
return dereference() && QPDFObjectTypeAccessor<QPDF_Dictionary>::check(obj);
|
||||
}
|
||||
|
||||
bool
|
||||
@ -2803,11 +2802,7 @@ QPDFObjectHandle::copyObject(
|
||||
|
||||
std::shared_ptr<QPDFObject> new_obj;
|
||||
|
||||
if (isBool() ||
|
||||
isInteger() ||
|
||||
isName() ||
|
||||
isNull() ||
|
||||
isReal() ||
|
||||
if (isBool() || isInteger() || isName() || isNull() || isReal() ||
|
||||
isString()) {
|
||||
new_obj = obj->shallowCopy();
|
||||
} else if (isArray()) {
|
||||
|
@ -144,7 +144,7 @@ QPDF_Stream::create(
|
||||
size_t length)
|
||||
{
|
||||
return do_create(
|
||||
new QPDF_Stream(qpdf, objid, generation, stream_dict, offset,length));
|
||||
new QPDF_Stream(qpdf, objid, generation, stream_dict, offset, length));
|
||||
}
|
||||
|
||||
std::shared_ptr<QPDFObject>
|
||||
|
@ -11,7 +11,8 @@ class QPDF_Array: public QPDFObject
|
||||
{
|
||||
public:
|
||||
virtual ~QPDF_Array() = default;
|
||||
static std::shared_ptr<QPDFObject> create(std::vector<QPDFObjectHandle> const& items);
|
||||
static std::shared_ptr<QPDFObject>
|
||||
create(std::vector<QPDFObjectHandle> const& items);
|
||||
static std::shared_ptr<QPDFObject> create(SparseOHArray const& items);
|
||||
virtual std::shared_ptr<QPDFObject> shallowCopy();
|
||||
virtual std::string unparse();
|
||||
|
@ -12,7 +12,8 @@ class QPDF_Dictionary: public QPDFObject
|
||||
{
|
||||
public:
|
||||
virtual ~QPDF_Dictionary() = default;
|
||||
static std::shared_ptr<QPDFObject> create(std::map<std::string, QPDFObjectHandle> const& items);
|
||||
static std::shared_ptr<QPDFObject>
|
||||
create(std::map<std::string, QPDFObjectHandle> const& items);
|
||||
virtual std::shared_ptr<QPDFObject> shallowCopy();
|
||||
virtual std::string unparse();
|
||||
virtual JSON getJSON(int json_version);
|
||||
|
@ -13,6 +13,7 @@ class QPDF_Null: public QPDFObject
|
||||
virtual JSON getJSON(int json_version);
|
||||
virtual QPDFObject::object_type_e getTypeCode() const;
|
||||
virtual char const* getTypeName() const;
|
||||
|
||||
private:
|
||||
QPDF_Null() = default;
|
||||
};
|
||||
|
@ -8,8 +8,8 @@ class QPDF_Real: public QPDFObject
|
||||
public:
|
||||
virtual ~QPDF_Real() = default;
|
||||
static std::shared_ptr<QPDFObject> create(std::string const& val);
|
||||
static std::shared_ptr<QPDFObject> create(
|
||||
double value, int decimal_places, bool trim_trailing_zeroes);
|
||||
static std::shared_ptr<QPDFObject>
|
||||
create(double value, int decimal_places, bool trim_trailing_zeroes);
|
||||
virtual std::shared_ptr<QPDFObject> shallowCopy();
|
||||
virtual std::string unparse();
|
||||
virtual JSON getJSON(int json_version);
|
||||
|
@ -13,6 +13,7 @@ class QPDF_Reserved: public QPDFObject
|
||||
virtual JSON getJSON(int json_version);
|
||||
virtual QPDFObject::object_type_e getTypeCode() const;
|
||||
virtual char const* getTypeName() const;
|
||||
|
||||
private:
|
||||
QPDF_Reserved() = default;
|
||||
};
|
||||
|
@ -12,7 +12,8 @@ class QPDF_String: public QPDFObject
|
||||
public:
|
||||
virtual ~QPDF_String() = default;
|
||||
static std::shared_ptr<QPDFObject> create(std::string const& val);
|
||||
static std::shared_ptr<QPDFObject> create_utf16(std::string const& utf8_val);
|
||||
static std::shared_ptr<QPDFObject>
|
||||
create_utf16(std::string const& utf8_val);
|
||||
virtual std::shared_ptr<QPDFObject> shallowCopy();
|
||||
virtual std::string unparse();
|
||||
virtual QPDFObject::object_type_e getTypeCode() const;
|
||||
|
Loading…
x
Reference in New Issue
Block a user