From 508aa5753c0e8e827fd03cdf9b016c4552ccba03 Mon Sep 17 00:00:00 2001 From: Henrique Nakashima Date: Tue, 27 Jun 2017 13:38:48 -0400 Subject: Converting CFX_ByteTextBuf to ostringstream in cfx_fontmapper.cpp. Bug: pdfium:731 Change-Id: I9453f28a17dd34908e6dcc97ea27e5ee84eda2d1 Reviewed-on: https://pdfium-review.googlesource.com/7011 Commit-Queue: dsinclair Reviewed-by: dsinclair --- core/fxge/ge/cfx_fontmapper.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'core/fxge') diff --git a/core/fxge/ge/cfx_fontmapper.cpp b/core/fxge/ge/cfx_fontmapper.cpp index 4d5e9c4831..5b4ceaac59 100644 --- a/core/fxge/ge/cfx_fontmapper.cpp +++ b/core/fxge/ge/cfx_fontmapper.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include @@ -225,16 +226,16 @@ CFX_ByteString GetFontFamily(CFX_ByteString fontName, int nStyle) { } CFX_ByteString ParseStyle(const char* pStyle, int iLen, int iIndex) { - CFX_ByteTextBuf buf; + std::ostringstream buf; if (!iLen || iLen <= iIndex) - return buf.MakeString(); + return CFX_ByteString(buf); while (iIndex < iLen) { if (pStyle[iIndex] == ',') break; - buf.AppendChar(pStyle[iIndex]); + buf << pStyle[iIndex]; ++iIndex; } - return buf.MakeString(); + return CFX_ByteString(buf); } int32_t GetStyleType(const CFX_ByteString& bsStyle, bool bReverse) { -- cgit v1.2.3