Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1521)

Unified Diff: core/fpdfapi/fpdf_render/fpdf_render_text.cpp

Issue 1885973002: Remove implicit cast from CFX_ByteString to (const char*). (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Typo Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/fpdfdoc/doc_basic.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_render/fpdf_render_text.cpp
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 264abe9a535caba4220ef2d526ab331d06778f30..ff8df7685d212c61dda2805525d481ff28a97cfa 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -637,7 +637,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
FX_ARGB stroke_argb,
const CFX_GraphStateData* pGraphState,
const CPDF_RenderOptions* pOptions) {
- int nChars = pFont->CountChar(str, str.GetLength());
+ int nChars = pFont->CountChar(str.c_str(), str.GetLength());
if (nChars == 0) {
return;
}
@@ -646,7 +646,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
uint32_t* pCharCodes;
FX_FLOAT* pCharPos;
if (nChars == 1) {
- charcode = pFont->GetNextChar(str, str.GetLength(), offset);
+ charcode = pFont->GetNextChar(str.c_str(), str.GetLength(), offset);
pCharCodes = (uint32_t*)(uintptr_t)charcode;
pCharPos = NULL;
} else {
@@ -654,7 +654,7 @@ void CPDF_TextRenderer::DrawTextString(CFX_RenderDevice* pDevice,
pCharPos = FX_Alloc(FX_FLOAT, nChars - 1);
FX_FLOAT cur_pos = 0;
for (int i = 0; i < nChars; i++) {
- pCharCodes[i] = pFont->GetNextChar(str, str.GetLength(), offset);
+ pCharCodes[i] = pFont->GetNextChar(str.c_str(), str.GetLength(), offset);
if (i) {
pCharPos[i - 1] = cur_pos;
}
« no previous file with comments | « core/fpdfapi/fpdf_parser/fpdf_parser_utility.cpp ('k') | core/fpdfdoc/doc_basic.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698