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 --- fxjs/cjx_node.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'fxjs/cjx_node.cpp') diff --git a/fxjs/cjx_node.cpp b/fxjs/cjx_node.cpp index b89101ce17..07b96b895f 100644 --- a/fxjs/cjx_node.cpp +++ b/fxjs/cjx_node.cpp @@ -1761,15 +1761,12 @@ void CJX_Node::Script_Som_FontColor(CFXJSE_Value* pValue, return; } - FX_ARGB color = fontData.GetColor(); int32_t a; int32_t r; int32_t g; int32_t b; - std::tie(a, r, g, b) = ArgbDecode(color); - ByteString bsColor; - bsColor.Format("%d,%d,%d", r, g, b); - pValue->SetString(bsColor.AsStringView()); + std::tie(a, r, g, b) = ArgbDecode(fontData.GetColor()); + pValue->SetString(ByteString::Format("%d,%d,%d", r, g, b).AsStringView()); } void CJX_Node::Script_Field_FormatMessage(CFXJSE_Value* pValue, -- cgit v1.2.3