From 28f97ff783c16f3391384ce97b765ce4eb310ac7 Mon Sep 17 00:00:00 2001 From: tsepez Date: Mon, 4 Apr 2016 16:41:35 -0700 Subject: Make down-conversion explicit from CFX_ByteString to CFX_ByteStringC. Having this happen implicitly can be dangerous because the lifetime has to be considered; we should have caught the "red bots" in https://codereview.chromium.org/1847333004/#ps60001 at compile time. Review URL: https://codereview.chromium.org/1853233002 --- core/fxge/ge/fx_ge_ps.cpp | 2 +- core/fxge/win32/fx_win32_device.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'core/fxge') diff --git a/core/fxge/ge/fx_ge_ps.cpp b/core/fxge/ge/fx_ge_ps.cpp index 32f2fce914..ec8f18e774 100644 --- a/core/fxge/ge/fx_ge_ps.cpp +++ b/core/fxge/ge/fx_ge_ps.cpp @@ -680,7 +680,7 @@ FX_BOOL CFX_PSRenderer::DrawText(int nChars, buf << pCharPos[i].m_OriginX << " " << pCharPos[i].m_OriginY << " m"; CFX_ByteString hex; hex.Format("<%02X>", ps_glyphindex); - buf << hex << "Tj\n"; + buf << hex.AsByteStringC() << "Tj\n"; } buf << "Q\n"; m_pOutput->OutputPS((const FX_CHAR*)buf.GetBuffer(), buf.GetSize()); diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index cb3f331d49..ed57a02c23 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -460,7 +460,7 @@ IFX_SystemFontInfo* IFX_SystemFontInfo::CreateDefault(const char** pUnused) { if (path_len > 0 && path_len < MAX_PATH) { CFX_ByteString fonts_path(windows_path); fonts_path += "\\Fonts"; - pInfoFallback->AddPath(fonts_path); + pInfoFallback->AddPath(fonts_path.AsByteStringC()); } return pInfoFallback; } -- cgit v1.2.3