From 12f1eb15ca3fed6310402847559a7c99d3c77847 Mon Sep 17 00:00:00 2001 From: Jay Berkenbilt Date: Sat, 2 Apr 2022 17:14:10 -0400 Subject: 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 --- libqpdf/QPDFXRefEntry.cc | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'libqpdf/QPDFXRefEntry.cc') 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 +#include #include #include -#include 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"); } -- cgit v1.2.3-54-g00ecf