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

Unified Diff: core/fxcrt/include/fx_string.h

Issue 1972053003: Add CFX_ByteStringC::CharAt() to avoid c_str() and casts (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 7 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/fxcrt/fx_xml_composer.cpp ('k') | xfa/fee/fde_txtedtengine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/fx_string.h
diff --git a/core/fxcrt/include/fx_string.h b/core/fxcrt/include/fx_string.h
index fbfb91f759620264b485c37756066299ddf25788..8db84dd2478f0d03cb0c90d3061600c698d8e615 100644
--- a/core/fxcrt/include/fx_string.h
+++ b/core/fxcrt/include/fx_string.h
@@ -99,6 +99,9 @@ class CFX_ByteStringC {
bool IsEmpty() const { return m_Length == 0; }
uint8_t GetAt(FX_STRSIZE index) const { return m_Ptr[index]; }
+ FX_CHAR CharAt(FX_STRSIZE index) const {
+ return static_cast<FX_CHAR>(m_Ptr[index]);
+ }
FX_STRSIZE Find(FX_CHAR ch) const {
const uint8_t* found =
« no previous file with comments | « core/fxcrt/fx_xml_composer.cpp ('k') | xfa/fee/fde_txtedtengine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698