aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/QPDFXRefEntry.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2022-04-02 23:14:10 +0200
committerJay Berkenbilt <ejb@ql.org>2022-04-04 14:10:40 +0200
commit12f1eb15ca3fed6310402847559a7c99d3c77847 (patch)
tree8935675b623c6f3b4914b8b44f7fa5f2816a9241 /libqpdf/QPDFXRefEntry.cc
parentf20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb (diff)
downloadqpdf-12f1eb15ca3fed6310402847559a7c99d3c77847.tar.zst
Programmatically apply new formatting to code
Run this: for i in **/*.cc **/*.c **/*.h **/*.hh; do clang-format < $i >| $i.new && mv $i.new $i done
Diffstat (limited to 'libqpdf/QPDFXRefEntry.cc')
-rw-r--r--libqpdf/QPDFXRefEntry.cc17
1 files changed, 6 insertions, 11 deletions
diff --git a/libqpdf/QPDFXRefEntry.cc b/libqpdf/QPDFXRefEntry.cc
index 8eb2ee1e..8c8ada5e 100644
--- a/libqpdf/QPDFXRefEntry.cc
+++ b/libqpdf/QPDFXRefEntry.cc
@@ -1,8 +1,8 @@
#include <qpdf/QPDFXRefEntry.hh>
+#include <qpdf/QIntC.hh>
#include <qpdf/QPDFExc.hh>
#include <qpdf/QUtil.hh>
-#include <qpdf/QIntC.hh>
QPDFXRefEntry::QPDFXRefEntry() :
type(0),
@@ -16,8 +16,7 @@ QPDFXRefEntry::QPDFXRefEntry(int type, qpdf_offset_t field1, int field2) :
field1(field1),
field2(field2)
{
- if ((type < 1) || (type > 2))
- {
+ if ((type < 1) || (type > 2)) {
throw std::logic_error(
"invalid xref type " + QUtil::int_to_string(type));
}
@@ -32,10 +31,8 @@ QPDFXRefEntry::getType() const
qpdf_offset_t
QPDFXRefEntry::getOffset() const
{
- if (this->type != 1)
- {
- throw std::logic_error(
- "getOffset called for xref entry of type != 1");
+ if (this->type != 1) {
+ throw std::logic_error("getOffset called for xref entry of type != 1");
}
return this->field1;
}
@@ -43,8 +40,7 @@ QPDFXRefEntry::getOffset() const
int
QPDFXRefEntry::getObjStreamNumber() const
{
- if (this->type != 2)
- {
+ if (this->type != 2) {
throw std::logic_error(
"getObjStreamNumber called for xref entry of type != 2");
}
@@ -54,8 +50,7 @@ QPDFXRefEntry::getObjStreamNumber() const
int
QPDFXRefEntry::getObjStreamIndex() const
{
- if (this->type != 2)
- {
+ if (this->type != 2) {
throw std::logic_error(
"getObjStreamIndex called for xref entry of type != 2");
}