From 1c4735aed9442a8e442214a23a3df94bd8fc99b5 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 16 Nov 2017 22:08:07 +0000 Subject: Convert ByteString::{Format|FormatV} to static methods This CL moves the Format and FormatV methods of ByteString to be static. Bug: pdfium:934 Change-Id: I9c30455a789aff9f619b9d5bf89c0712644f2d9a Reviewed-on: https://pdfium-review.googlesource.com/18650 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- core/fpdfdoc/cpdf_formcontrol.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'core/fpdfdoc/cpdf_formcontrol.cpp') diff --git a/core/fpdfdoc/cpdf_formcontrol.cpp b/core/fpdfdoc/cpdf_formcontrol.cpp index 7d4067b52f..5e24c5fb9e 100644 --- a/core/fpdfdoc/cpdf_formcontrol.cpp +++ b/core/fpdfdoc/cpdf_formcontrol.cpp @@ -101,10 +101,8 @@ ByteString CPDF_FormControl::GetCheckedAPState() { ByteString csOn = GetOnStateName(); if (GetType() == CPDF_FormField::RadioButton || GetType() == CPDF_FormField::CheckBox) { - if (ToArray(FPDF_GetFieldAttr(m_pField->GetDict(), "Opt"))) { - int iIndex = m_pField->GetControlIndex(this); - csOn.Format("%d", iIndex); - } + if (ToArray(FPDF_GetFieldAttr(m_pField->GetDict(), "Opt"))) + csOn = ByteString::Format("%d", m_pField->GetControlIndex(this)); } if (csOn.IsEmpty()) csOn = "Yes"; -- cgit v1.2.3