summaryrefslogtreecommitdiff
path: root/core/fxcrt/cfx_bytestring.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-04-24 16:28:07 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-04-25 00:07:29 +0000
commitef002c85521278e3082517297cf60372d7751cb1 (patch)
treebe0148d89603262c1bf11f16621a1c43509759db /core/fxcrt/cfx_bytestring.cpp
parent3684a151e76991bc67dd397cba66b0620cc38bae (diff)
downloadpdfium-ef002c85521278e3082517297cf60372d7751cb1.tar.xz
Use fx_extension.h utilities in more places.
Change-Id: Iba1aa793567e69acc3cc1acbd5b9a9f531c80b7a Reviewed-on: https://pdfium-review.googlesource.com/4453 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcrt/cfx_bytestring.cpp')
-rw-r--r--core/fxcrt/cfx_bytestring.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/core/fxcrt/cfx_bytestring.cpp b/core/fxcrt/cfx_bytestring.cpp
index ab35e5d0c5..5c534507c6 100644
--- a/core/fxcrt/cfx_bytestring.cpp
+++ b/core/fxcrt/cfx_bytestring.cpp
@@ -13,6 +13,7 @@
#include "core/fxcrt/cfx_string_pool_template.h"
#include "core/fxcrt/fx_basic.h"
+#include "core/fxcrt/fx_extension.h"
#include "core/fxcrt/fx_safe_types.h"
#include "third_party/base/numerics/safe_math.h"
#include "third_party/base/stl_util.h"
@@ -266,14 +267,8 @@ bool CFX_ByteString::EqualNoCase(const CFX_ByteStringC& str) const {
const uint8_t* pThat = str.raw_str();
for (FX_STRSIZE i = 0; i < len; i++) {
if ((*pThis) != (*pThat)) {
- uint8_t bThis = *pThis;
- if (bThis >= 'A' && bThis <= 'Z')
- bThis += 'a' - 'A';
-
- uint8_t bThat = *pThat;
- if (bThat >= 'A' && bThat <= 'Z')
- bThat += 'a' - 'A';
-
+ uint8_t bThis = FXSYS_tolower(*pThis);
+ uint8_t bThat = FXSYS_tolower(*pThat);
if (bThis != bThat)
return false;
}