diff options
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"); } |