From c4a2b7518949df00651aa3513c93079f1968441e Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Fri, 7 Apr 2017 13:56:13 -0700 Subject: Cleanup string passing in core/fpdf* MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Return strings where possible. Add missing consts to strings passed by ref. Convert non-const cases to pointers. Rename a few methods to be clearer. Change-Id: I86569bc1744f539e6dd67fc73649b272c016328c Reviewed-on: https://pdfium-review.googlesource.com/3951 Commit-Queue: Tom Sepez Reviewed-by: Nicolás Peña --- fpdfsdk/javascript/Field.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/javascript') diff --git a/fpdfsdk/javascript/Field.cpp b/fpdfsdk/javascript/Field.cpp index 12c3508597..c7dc2608ca 100644 --- a/fpdfsdk/javascript/Field.cpp +++ b/fpdfsdk/javascript/Field.cpp @@ -2482,12 +2482,10 @@ bool Field::textSize(CJS_Runtime* pRuntime, if (!pFormControl) return false; - CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance(); - - CFX_ByteString csFontNameTag; float fFontSize; - FieldAppearance.GetFont(csFontNameTag, fFontSize); - vp << (int)fFontSize; + CPDF_DefaultAppearance FieldAppearance = pFormControl->GetDefaultAppearance(); + FieldAppearance.GetFont(&fFontSize); + vp << static_cast(fFontSize); return true; } -- cgit v1.2.3