summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_font/cpdf_font.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-05-12 15:52:14 -0700
committerCommit bot <commit-bot@chromium.org>2016-05-12 15:52:14 -0700
commit28c7844c1ef5ea0c8727b890e9ff56b593119a00 (patch)
treea96e31bbff3c221a0030e3a8a6501a5f81379d0f /core/fpdfapi/fpdf_font/cpdf_font.cpp
parentade9465067098d9f94a13f61741cebf4bb8aac47 (diff)
downloadpdfium-28c7844c1ef5ea0c8727b890e9ff56b593119a00.tar.xz
Add CFX_ByteStringC::CharAt() to avoid c_str() and casts.
Most of the time, we want to operate on chars as if they were unsigned, but there are a few places where we need the default (questionably signed) values. Consolidate the casting in a single place rather than forcing callers to get a char* ptr. BUG=pdfium:493 Review-Url: https://codereview.chromium.org/1972053003
Diffstat (limited to 'core/fpdfapi/fpdf_font/cpdf_font.cpp')
-rw-r--r--core/fpdfapi/fpdf_font/cpdf_font.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/fpdfapi/fpdf_font/cpdf_font.cpp b/core/fpdfapi/fpdf_font/cpdf_font.cpp
index f143bed541..9fb54a828b 100644
--- a/core/fpdfapi/fpdf_font/cpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/cpdf_font.cpp
@@ -149,7 +149,7 @@ FX_BOOL CPDF_Font::IsVertWriting() const {
}
int CPDF_Font::AppendChar(FX_CHAR* buf, uint32_t charcode) const {
- *buf = (FX_CHAR)charcode;
+ *buf = static_cast<FX_CHAR>(charcode);
return 1;
}