aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-06-27 18:50:35 +0200
committerJay Berkenbilt <ejb@ql.org>2022-06-27 18:50:35 +0200
commita603c1e395d039e71ca8e4c70bc43f2f9d2d604b (patch)
tree29cc9bfda3ad69f152cfce96e613a6874942c0f0
parentc810f0f21edf7416c6e7944d6b1619e308c764c3 (diff)
downloadqpdf-a603c1e395d039e71ca8e4c70bc43f2f9d2d604b.tar.zst
Run format-code
-rw-r--r--include/qpdf/QPDFObjectHandle.hh2
-rw-r--r--libqpdf/QPDFObjectHandle.cc13
-rw-r--r--libqpdf/QPDF_Stream.cc2
-rw-r--r--libqpdf/qpdf/QPDF_Array.hh3
-rw-r--r--libqpdf/qpdf/QPDF_Dictionary.hh3
-rw-r--r--libqpdf/qpdf/QPDF_Null.hh1
-rw-r--r--libqpdf/qpdf/QPDF_Real.hh4
-rw-r--r--libqpdf/qpdf/QPDF_Reserved.hh1
-rw-r--r--libqpdf/qpdf/QPDF_String.hh3
9 files changed, 16 insertions, 16 deletions
diff --git a/include/qpdf/QPDFObjectHandle.hh b/include/qpdf/QPDFObjectHandle.hh
index cda257f1..292397d4 100644
--- a/include/qpdf/QPDFObjectHandle.hh
+++ b/include/qpdf/QPDFObjectHandle.hh
@@ -1466,7 +1466,7 @@ class QPDFObjectHandle
{
if (!o.dereference()) {
throw std::logic_error("attempted to dereference an"
- " uninitialized QPDFObjectHandle");
+ " uninitialized QPDFObjectHandle");
};
return o.obj;
}
diff --git a/libqpdf/QPDFObjectHandle.cc b/libqpdf/QPDFObjectHandle.cc
index d39f93be..66087dd4 100644
--- a/libqpdf/QPDFObjectHandle.cc
+++ b/libqpdf/QPDFObjectHandle.cc
@@ -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()) {
diff --git a/libqpdf/QPDF_Stream.cc b/libqpdf/QPDF_Stream.cc
index c4c69659..0b06a7f5 100644
--- a/libqpdf/QPDF_Stream.cc
+++ b/libqpdf/QPDF_Stream.cc
@@ -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>
diff --git a/libqpdf/qpdf/QPDF_Array.hh b/libqpdf/qpdf/QPDF_Array.hh
index e718c6e0..3e095637 100644
--- a/libqpdf/qpdf/QPDF_Array.hh
+++ b/libqpdf/qpdf/QPDF_Array.hh
@@ -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();
diff --git a/libqpdf/qpdf/QPDF_Dictionary.hh b/libqpdf/qpdf/QPDF_Dictionary.hh
index 3cd00c1e..cacc8961 100644
--- a/libqpdf/qpdf/QPDF_Dictionary.hh
+++ b/libqpdf/qpdf/QPDF_Dictionary.hh
@@ -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);
diff --git a/libqpdf/qpdf/QPDF_Null.hh b/libqpdf/qpdf/QPDF_Null.hh
index 8051e238..16833424 100644
--- a/libqpdf/qpdf/QPDF_Null.hh
+++ b/libqpdf/qpdf/QPDF_Null.hh
@@ -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;
};
diff --git a/libqpdf/qpdf/QPDF_Real.hh b/libqpdf/qpdf/QPDF_Real.hh
index bf61091c..f5ab4bd6 100644
--- a/libqpdf/qpdf/QPDF_Real.hh
+++ b/libqpdf/qpdf/QPDF_Real.hh
@@ -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);
diff --git a/libqpdf/qpdf/QPDF_Reserved.hh b/libqpdf/qpdf/QPDF_Reserved.hh
index 1a40447d..243a1728 100644
--- a/libqpdf/qpdf/QPDF_Reserved.hh
+++ b/libqpdf/qpdf/QPDF_Reserved.hh
@@ -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;
};
diff --git a/libqpdf/qpdf/QPDF_String.hh b/libqpdf/qpdf/QPDF_String.hh
index fc11d3ba..b6d77637 100644
--- a/libqpdf/qpdf/QPDF_String.hh
+++ b/libqpdf/qpdf/QPDF_String.hh
@@ -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;