From d5e7b355b8c4c22ff770547797cbc536bdc95d5b Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Mon, 29 Feb 2016 11:24:29 -0800 Subject: Fixup FX_RECT and FX_SMALL_RECT classes. Put these first, so later on more complicated classes can have constructors that take these as arguments. Add better constructors, and call appropriately. Also don't be afraid to return these from methods since RVO. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1745683002 . --- core/src/fpdfapi/fpdf_page/fpdf_page.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'core/src/fpdfapi/fpdf_page/fpdf_page.cpp') diff --git a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp index f05c4bea92..301fca8969 100644 --- a/core/src/fpdfapi/fpdf_page/fpdf_page.cpp +++ b/core/src/fpdfapi/fpdf_page/fpdf_page.cpp @@ -251,8 +251,7 @@ void CPDF_TextObject::CalcPositionData(FX_FLOAT* pTextAdvanceX, } m_pCharPos[i - 1] = curpos; } - FX_RECT char_rect; - pFont->GetCharBBox(charcode, char_rect, level); + FX_RECT char_rect = pFont->GetCharBBox(charcode, level); FX_FLOAT charwidth; if (!bVertWriting) { if (min_y > char_rect.top) { -- cgit v1.2.3