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

Unified Diff: core/fxge/ge/fx_ge_fontmap.cpp

Issue 1977093002: Make CFX_ByteString(const CFX_ByteStringC&) explicit. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Rebase, nit 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/include/fx_xml.h ('k') | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxge/ge/fx_ge_fontmap.cpp
diff --git a/core/fxge/ge/fx_ge_fontmap.cpp b/core/fxge/ge/fx_ge_fontmap.cpp
index 85246600430d6c0e93cca7260605c360a74d49cb..e8af2dce534c1042296b7ec2fd4cec83e0cd9fd2 100644
--- a/core/fxge/ge/fx_ge_fontmap.cpp
+++ b/core/fxge/ge/fx_ge_fontmap.cpp
@@ -317,7 +317,7 @@ CFX_ByteString GetFontFamily(CFX_ByteString fontName, int nStyle) {
CFX_ByteString ParseStyle(const FX_CHAR* pStyle, int iLen, int iIndex) {
CFX_ByteTextBuf buf;
if (!iLen || iLen <= iIndex) {
- return buf.AsStringC();
+ return buf.MakeString();
}
while (iIndex < iLen) {
if (pStyle[iIndex] == ',') {
@@ -326,7 +326,7 @@ CFX_ByteString ParseStyle(const FX_CHAR* pStyle, int iLen, int iIndex) {
buf.AppendChar(pStyle[iIndex]);
++iIndex;
}
- return buf.AsStringC();
+ return buf.MakeString();
}
int32_t GetStyleType(const CFX_ByteString& bsStyle, FX_BOOL bRevert) {
@@ -688,7 +688,7 @@ static CFX_ByteString GetStringFromTable(const uint8_t* string_ptr,
if (string_ptr_length < static_cast<uint32_t>(offset + length)) {
return CFX_ByteString();
}
- return CFX_ByteStringC(string_ptr + offset, length);
+ return CFX_ByteString(string_ptr + offset, length);
}
CFX_ByteString GetNameFromTT(const uint8_t* name_table,
@@ -1368,12 +1368,15 @@ CFX_FolderFontInfo::~CFX_FolderFontInfo() {
delete pair.second;
}
}
+
void CFX_FolderFontInfo::AddPath(const CFX_ByteStringC& path) {
- m_PathList.push_back(path);
+ m_PathList.push_back(CFX_ByteString(path));
}
+
void CFX_FolderFontInfo::Release() {
delete this;
}
+
FX_BOOL CFX_FolderFontInfo::EnumFontList(CFX_FontMapper* pMapper) {
m_pMapper = pMapper;
for (const auto& path : m_PathList)
« no previous file with comments | « core/fxcrt/include/fx_xml.h ('k') | core/fxge/ge/fx_ge_text.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698