From 9a3a077e4820efa035eca4aec7e93fbd1298d6cb Mon Sep 17 00:00:00 2001 From: Lei Zhang Date: Wed, 13 Dec 2017 14:36:52 +0000 Subject: Use size_t in CXML_Element and callers. Change-Id: I9ebacd18252a837f1f5f13ccaec19b196bacc3ae Reviewed-on: https://pdfium-review.googlesource.com/21072 Commit-Queue: dsinclair Reviewed-by: dsinclair --- xfa/fxfa/parser/cxfa_xmllocale.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'xfa/fxfa') 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)); -- cgit v1.2.3