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/Pl_RC4.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/Pl_RC4.cc')
-rw-r--r-- | libqpdf/Pl_RC4.cc | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/libqpdf/Pl_RC4.cc b/libqpdf/Pl_RC4.cc index aa4c089e..17da3f53 100644 --- a/libqpdf/Pl_RC4.cc +++ b/libqpdf/Pl_RC4.cc @@ -2,9 +2,12 @@ #include <qpdf/QUtil.hh> -Pl_RC4::Pl_RC4(char const* identifier, Pipeline* next, - unsigned char const* key_data, int key_len, - size_t out_bufsize) : +Pl_RC4::Pl_RC4( + char const* identifier, + Pipeline* next, + unsigned char const* key_data, + int key_len, + size_t out_bufsize) : Pipeline(identifier, next), out_bufsize(out_bufsize), rc4(key_data, key_len) @@ -19,8 +22,7 @@ Pl_RC4::~Pl_RC4() void Pl_RC4::write(unsigned char* data, size_t len) { - if (this->outbuf.get() == 0) - { + if (this->outbuf.get() == 0) { throw std::logic_error( this->identifier + ": Pl_RC4: write() called after finish() called"); @@ -29,8 +31,7 @@ Pl_RC4::write(unsigned char* data, size_t len) size_t bytes_left = len; unsigned char* p = data; - while (bytes_left > 0) - { + while (bytes_left > 0) { size_t bytes = (bytes_left < this->out_bufsize ? bytes_left : out_bufsize); bytes_left -= bytes; |