From ef002c85521278e3082517297cf60372d7751cb1 Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Mon, 24 Apr 2017 16:28:07 -0700 Subject: Use fx_extension.h utilities in more places. Change-Id: Iba1aa793567e69acc3cc1acbd5b9a9f531c80b7a Reviewed-on: https://pdfium-review.googlesource.com/4453 Reviewed-by: Tom Sepez Commit-Queue: Lei Zhang --- core/fxcrt/cfx_bytestring.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'core/fxcrt/cfx_bytestring.cpp') 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; } -- cgit v1.2.3