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/BitWriter.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/BitWriter.cc')
-rw-r--r-- | libqpdf/BitWriter.cc | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/libqpdf/BitWriter.cc b/libqpdf/BitWriter.cc index 9d324734..25585924 100644 --- a/libqpdf/BitWriter.cc +++ b/libqpdf/BitWriter.cc @@ -21,12 +21,9 @@ void BitWriter::writeBitsSigned(long long val, size_t bits) { unsigned long long uval = 0; - if (val < 0) - { + if (val < 0) { uval = (1ULL << bits) + static_cast<unsigned long long>(val); - } - else - { + } else { uval = static_cast<unsigned long long>(val); } writeBits(uval, bits); @@ -41,8 +38,7 @@ BitWriter::writeBitsInt(int val, size_t bits) void BitWriter::flush() { - if (bit_offset < 7) - { + if (bit_offset < 7) { size_t bits_to_write = bit_offset + 1; write_bits(this->ch, this->bit_offset, 0, bits_to_write, this->pl); } |