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 --- fpdfsdk/fpdfattachment.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'fpdfsdk/fpdfattachment.cpp') diff --git a/fpdfsdk/fpdfattachment.cpp b/fpdfsdk/fpdfattachment.cpp index 7402114756..8b3c8fe20a 100644 --- a/fpdfsdk/fpdfattachment.cpp +++ b/fpdfsdk/fpdfattachment.cpp @@ -232,11 +232,13 @@ FPDFAttachment_SetFile(FPDF_ATTACHMENT attachment, // Set the creation date of the new attachment in the dictionary. CFX_DateTime dateTime; dateTime.Now(); - ByteString bsDateTime; - bsDateTime.Format("D:%d%02d%02d%02d%02d%02d", dateTime.GetYear(), - dateTime.GetMonth(), dateTime.GetDay(), dateTime.GetHour(), - dateTime.GetMinute(), dateTime.GetSecond()); - pParamsDict->SetNewFor("CreationDate", bsDateTime, false); + pParamsDict->SetNewFor( + "CreationDate", + ByteString::Format("D:%d%02d%02d%02d%02d%02d", dateTime.GetYear(), + dateTime.GetMonth(), dateTime.GetDay(), + dateTime.GetHour(), dateTime.GetMinute(), + dateTime.GetSecond()), + false); // Set the checksum of the new attachment in the dictionary. pParamsDict->SetNewFor( -- cgit v1.2.3