aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_TIFFPredictor.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2023-05-21 19:35:09 +0200
committerJay Berkenbilt <ejb@ql.org>2023-05-21 19:35:09 +0200
commit60965d5f4d608bdccc2ffd4e8753e12cbbbd71d2 (patch)
treea707602da466c02ff1a54b3263c3a881cd7204a4 /libqpdf/Pl_TIFFPredictor.cc
parent6b077332d38c093de2618d5e1481b42222106065 (diff)
downloadqpdf-60965d5f4d608bdccc2ffd4e8753e12cbbbd71d2.tar.zst
Rerun clang-format
Diffstat (limited to 'libqpdf/Pl_TIFFPredictor.cc')
-rw-r--r--libqpdf/Pl_TIFFPredictor.cc23
1 files changed, 7 insertions, 16 deletions
diff --git a/libqpdf/Pl_TIFFPredictor.cc b/libqpdf/Pl_TIFFPredictor.cc
index ad620f62..51594d11 100644
--- a/libqpdf/Pl_TIFFPredictor.cc
+++ b/libqpdf/Pl_TIFFPredictor.cc
@@ -25,23 +25,17 @@ Pl_TIFFPredictor::Pl_TIFFPredictor(
pos(0)
{
if (samples_per_pixel < 1) {
- throw std::runtime_error(
- "TIFFPredictor created with invalid samples_per_pixel");
+ throw std::runtime_error("TIFFPredictor created with invalid samples_per_pixel");
}
- if ((bits_per_sample < 1) ||
- (bits_per_sample > (8 * (sizeof(unsigned long long))))) {
- throw std::runtime_error(
- "TIFFPredictor created with invalid bits_per_sample");
+ if ((bits_per_sample < 1) || (bits_per_sample > (8 * (sizeof(unsigned long long))))) {
+ throw std::runtime_error("TIFFPredictor created with invalid bits_per_sample");
}
- unsigned long long bpr =
- ((columns * bits_per_sample * samples_per_pixel) + 7) / 8;
+ unsigned long long bpr = ((columns * bits_per_sample * samples_per_pixel) + 7) / 8;
if ((bpr == 0) || (bpr > (UINT_MAX - 1))) {
- throw std::runtime_error(
- "TIFFPredictor created with invalid columns value");
+ throw std::runtime_error("TIFFPredictor created with invalid columns value");
}
this->bytes_per_row = bpr & UINT_MAX;
- this->cur_row =
- QUtil::make_shared_array<unsigned char>(this->bytes_per_row);
+ this->cur_row = QUtil::make_shared_array<unsigned char>(this->bytes_per_row);
memset(this->cur_row.get(), 0, this->bytes_per_row);
}
@@ -72,10 +66,7 @@ Pl_TIFFPredictor::write(unsigned char const* data, size_t len)
void
Pl_TIFFPredictor::processRow()
{
- QTC::TC(
- "libtests",
- "Pl_TIFFPredictor processRow",
- (action == a_decode ? 0 : 1));
+ QTC::TC("libtests", "Pl_TIFFPredictor processRow", (action == a_decode ? 0 : 1));
BitWriter bw(this->getNext());
BitStream in(this->cur_row.get(), this->bytes_per_row);
std::vector<long long> prev;