summaryrefslogtreecommitdiff
path: root/xfa/fxfa/app/xfa_fontmgr.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-01 10:23:04 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-01 10:23:05 -0700
commit9f2970caec897c40b91bd010c04dfe1f19d11108 (patch)
treed0a289939b3b6be3fe19a412b134eeb467672db2 /xfa/fxfa/app/xfa_fontmgr.cpp
parentdf4bc596c64fb848647c670be66a29ea0861b4f4 (diff)
downloadpdfium-9f2970caec897c40b91bd010c04dfe1f19d11108.tar.xz
Remove CFX_{Byte,Wide}String::Equal in favor of "==".
Makes the code slightly cleaner. Review URL: https://codereview.chromium.org/1846083002
Diffstat (limited to 'xfa/fxfa/app/xfa_fontmgr.cpp')
-rw-r--r--xfa/fxfa/app/xfa_fontmgr.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/xfa/fxfa/app/xfa_fontmgr.cpp b/xfa/fxfa/app/xfa_fontmgr.cpp
index fb6fd39249..e915dcbaf7 100644
--- a/xfa/fxfa/app/xfa_fontmgr.cpp
+++ b/xfa/fxfa/app/xfa_fontmgr.cpp
@@ -1960,8 +1960,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) {
@@ -1970,18 +1970,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;