summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-12-13 14:36:52 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-12-13 14:36:52 +0000
commit9a3a077e4820efa035eca4aec7e93fbd1298d6cb (patch)
tree682e7861f7d7148e3b0d24646397d226e9262366 /xfa/fxfa
parentaa123edaf307ac238f3aa79d951ea4b991c1f7aa (diff)
downloadpdfium-9a3a077e4820efa035eca4aec7e93fbd1298d6cb.tar.xz
Use size_t in CXML_Element and callers.
Change-Id: I9ebacd18252a837f1f5f13ccaec19b196bacc3ae Reviewed-on: https://pdfium-review.googlesource.com/21072 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/parser/cxfa_xmllocale.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/xfa/fxfa/parser/cxfa_xmllocale.cpp b/xfa/fxfa/parser/cxfa_xmllocale.cpp
index f9e4353dca..659c7bbefe 100644
--- a/xfa/fxfa/parser/cxfa_xmllocale.cpp
+++ b/xfa/fxfa/parser/cxfa_xmllocale.cpp
@@ -109,7 +109,7 @@ WideString CXFA_XMLLocale::GetEraName(bool bAD) const {
WideString CXFA_XMLLocale::GetCalendarSymbol(const ByteStringView& symbol,
int index,
bool bAbbr) const {
- if (!m_pLocaleData)
+ if (index < 0 || !m_pLocaleData)
return WideString();
CXML_Element* pChild = m_pLocaleData->GetElement("", "calendarSymbols", 0);
@@ -195,8 +195,8 @@ WideString CXFA_XMLLocale::GetNumPattern(FX_LOCALENUMSUBCATEGORY eType) const {
WideString CXFA_XMLLocale::GetPattern(CXML_Element* pElement,
const ByteStringView& bsTag,
const WideStringView& wsName) const {
- int32_t iCount = pElement->CountElements("", bsTag);
- for (int32_t i = 0; i < iCount; i++) {
+ size_t iCount = pElement->CountElements("", bsTag);
+ for (size_t i = 0; i < iCount; i++) {
CXML_Element* pChild = pElement->GetElement("", bsTag, i);
if (pChild->GetAttrValue("name") == wsName) {
CXML_Content* pContent = ToContent(pChild->GetChild(0));