From 908e2efde6668b9d0bf4721fe18aa3bb8e4ef717 Mon Sep 17 00:00:00 2001 From: Henner Zeller Date: Wed, 24 Jan 2024 19:07:14 -0800 Subject: [PATCH] No need for extra variable for target width/height. --- src/pdf-image-source.cc | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/pdf-image-source.cc b/src/pdf-image-source.cc index b7528a8..979396a 100644 --- a/src/pdf-image-source.cc +++ b/src/pdf-image-source.cc @@ -75,13 +75,10 @@ bool PDFImageSource::LoadAndScale(const DisplayOptions &opts, int frame_offset, .x1 = 0, .y1 = 0, .x2 = orig_width_, .y2 = orig_height_}; } - int target_width; - int target_height; + int render_width; + int render_height; CalcScaleToFitDisplay(orig_width_, orig_height_, opts, false, - &target_width, &target_height); - - int render_width = target_width; - int render_height = target_height; + &render_width, &render_height); const auto kCairoFormat = CAIRO_FORMAT_ARGB32; int stride = cairo_format_stride_for_width(kCairoFormat, render_width);