summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/cpdf_font.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-20 19:05:00 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-20 19:05:00 +0000
commitcc42afc14b6e54750a95b0e5fd7f01664280c36e (patch)
treefc5d57db9d91bf2ba4581d001d08e7c0f58a725c /core/fpdfapi/font/cpdf_font.cpp
parent1986bdfb19614b1bf18941b89ded895e237b53ae (diff)
downloadpdfium-cc42afc14b6e54750a95b0e5fd7f01664280c36e.tar.xz
Combine operator< and ByteString::Compare().
Fix or optimize some ByteString::Compare() callers. Change-Id: I0fde91afc3d17fe160b46d00a441ad05e56377e7 Reviewed-on: https://pdfium-review.googlesource.com/20851 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/cpdf_font.cpp')
-rw-r--r--core/fpdfapi/font/cpdf_font.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/fpdfapi/font/cpdf_font.cpp b/core/fpdfapi/font/cpdf_font.cpp
index 12e5aaf3a8..8d35739d78 100644
--- a/core/fpdfapi/font/cpdf_font.cpp
+++ b/core/fpdfapi/font/cpdf_font.cpp
@@ -395,9 +395,8 @@ void CPDF_Font::LoadPDFEncoding(CPDF_Object* pEncoding,
if (iBaseEncoding != PDFFONT_ENCODING_ADOBE_SYMBOL &&
iBaseEncoding != PDFFONT_ENCODING_ZAPFDINGBATS) {
ByteString bsEncoding = pDict->GetStringFor("BaseEncoding");
- if (bsEncoding.Compare("MacExpertEncoding") == 0 && bTrueType) {
+ if (bTrueType && bsEncoding.Compare("MacExpertEncoding") == 0)
bsEncoding = "WinAnsiEncoding";
- }
GetPredefinedEncoding(bsEncoding, &iBaseEncoding);
}
if ((!bEmbedded || bTrueType) && iBaseEncoding == PDFFONT_ENCODING_BUILTIN)