From 3f1c832dda209cf6682bb75316c07d71332fe6c3 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 16 Nov 2017 21:45:18 +0000 Subject: Make WideString::{Format|FormatV} static This CL moves the Format and FormatV methods from WideString to be static. Bug: pdfium:934 Change-Id: I9941d6a2a5bbf0a82087cd0ea5d0f8fc42eecd3e Reviewed-on: https://pdfium-review.googlesource.com/18630 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fxcrt/widestring.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'core/fxcrt/widestring.h') diff --git a/core/fxcrt/widestring.h b/core/fxcrt/widestring.h index 01c4eedaf1..9d856c72c9 100644 --- a/core/fxcrt/widestring.h +++ b/core/fxcrt/widestring.h @@ -33,6 +33,9 @@ class WideString { using const_iterator = const CharType*; using const_reverse_iterator = std::reverse_iterator; + static WideString Format(const wchar_t* lpszFormat, ...); + static WideString FormatV(const wchar_t* lpszFormat, va_list argList); + WideString(); WideString(const WideString& other); WideString(WideString&& other) noexcept; @@ -141,9 +144,6 @@ class WideString { size_t InsertAtBack(wchar_t ch) { return Insert(GetLength(), ch); } size_t Delete(size_t index, size_t count = 1); - void Format(const wchar_t* lpszFormat, ...); - void FormatV(const wchar_t* lpszFormat, va_list argList); - void MakeLower(); void MakeUpper(); @@ -189,9 +189,6 @@ class WideString { void AssignCopy(const wchar_t* pSrcData, size_t nSrcLen); void Concat(const wchar_t* lpszSrcData, size_t nSrcLen); - // Returns true unless we ran out of space. - bool TryVSWPrintf(size_t size, const wchar_t* format, va_list argList); - RetainPtr m_pData; friend WideString_ConcatInPlace_Test; -- cgit v1.2.3