summaryrefslogtreecommitdiff
path: root/core/fxge
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-04 16:41:35 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-04 16:41:35 -0700
commit28f97ff783c16f3391384ce97b765ce4eb310ac7 (patch)
tree69c4c8bc9dd39d5336c96f28b633d197dd207c81 /core/fxge
parented9c4386713084f37548b46ab36f618021f716f5 (diff)
downloadpdfium-28f97ff783c16f3391384ce97b765ce4eb310ac7.tar.xz
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
Diffstat (limited to 'core/fxge')
-rw-r--r--core/fxge/ge/fx_ge_ps.cpp2
-rw-r--r--core/fxge/win32/fx_win32_device.cpp2
2 files changed, 2 insertions, 2 deletions
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;
}