diff options
author | Jay Berkenbilt <ejb@ql.org> | 2022-04-02 23:14:10 +0200 |
---|---|---|
committer | Jay Berkenbilt <ejb@ql.org> | 2022-04-04 14:10:40 +0200 |
commit | 12f1eb15ca3fed6310402847559a7c99d3c77847 (patch) | |
tree | 8935675b623c6f3b4914b8b44f7fa5f2816a9241 /libqpdf/QPDFXRefEntry.cc | |
parent | f20fa61eb4c323eb1642c69c236b3d9a1f8b2cdb (diff) | |
download | qpdf-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.cc | 17 |
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"); } |