From 0ada873c4521b9691b445972531617bbd4071384 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 23 May 2018 19:43:23 +0200 Subject: [PATCH] Slightly simplify wxHtmlDCRenderer::Render() Use "totalHeight" variable to make it more clear that m_Cells->GetHeight() and GetTotalHeight() are the same value. --- src/html/htmprint.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/html/htmprint.cpp b/src/html/htmprint.cpp index 84f77b7df4..a11eeae995 100644 --- a/src/html/htmprint.cpp +++ b/src/html/htmprint.cpp @@ -168,8 +168,8 @@ int wxHtmlDCRenderer::Render(int x, int y, rinfo); } - if (pbreak < m_Cells->GetHeight()) return pbreak; - else return GetTotalHeight(); + const int totalHeight = GetTotalHeight(); + return pbreak < totalHeight ? pbreak : totalHeight; } int wxHtmlDCRenderer::GetTotalWidth() const