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

Unified Diff: xfa/fxfa/app/xfa_fontmgr.cpp

Issue 1846083002: Remove CFX_{Byte,Wide}String::Equal in favor of "==". (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 4 years, 9 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
Index: xfa/fxfa/app/xfa_fontmgr.cpp
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index 256af6cf21f101204bc11bf47536a7cf60dffd99..43749496134e0d290b3617860e1e40f20f2af2aa 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1966,8 +1966,8 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(
}
if (iDifferLength > 1) {
CFX_ByteString bsDRTailer = bsDRName.Right(iDifferLength);
- if (bsDRTailer.Equal("MT") || bsDRTailer.Equal("PSMT") ||
- bsDRTailer.Equal("Regular") || bsDRTailer.Equal("Reg")) {
+ if (bsDRTailer == "MT" || bsDRTailer == "PSMT" ||
+ bsDRTailer == "Regular" || bsDRTailer == "Reg") {
return TRUE;
}
if (bBoldFont || bItalicFont) {
@@ -1976,18 +1976,17 @@ FX_BOOL CXFA_PDFFontMgr::PsNameMatchDRFontName(
FX_BOOL bMatch = FALSE;
switch (bsPsName.GetAt(iPsLen - 1)) {
case 'L': {
- if (bsDRName.Right(5).Equal("Light")) {
+ if (bsDRName.Right(5) == "Light") {
bMatch = TRUE;
}
} break;
case 'R': {
- if (bsDRName.Right(7).Equal("Regular") ||
- bsDRName.Right(3).Equal("Reg")) {
+ if (bsDRName.Right(7) == "Regular" || bsDRName.Right(3) == "Reg") {
bMatch = TRUE;
}
} break;
case 'M': {
- if (bsDRName.Right(5).Equal("Medium")) {
+ if (bsDRName.Right(5) == "Medium") {
bMatch = TRUE;
}
} break;

Powered by Google App Engine
This is Rietveld 408576698