summaryrefslogtreecommitdiff
path: root/fpdfsdk
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 /fpdfsdk
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 'fpdfsdk')
-rw-r--r--fpdfsdk/fpdf_ext.cpp9
-rw-r--r--fpdfsdk/pwl/cpwl_edit.cpp8
2 files changed, 8 insertions, 9 deletions
diff --git a/fpdfsdk/fpdf_ext.cpp b/fpdfsdk/fpdf_ext.cpp
index 1e39f2b2c9..87605cfad6 100644
--- a/fpdfsdk/fpdf_ext.cpp
+++ b/fpdfsdk/fpdf_ext.cpp
@@ -76,9 +76,8 @@ void CheckUnSupportAnnot(CPDF_Document* pDoc, const CPDF_Annot* pPDFAnnot) {
}
bool CheckSharedForm(const CXML_Element* pElement, ByteString cbName) {
- int count = pElement->CountAttrs();
- int i = 0;
- for (i = 0; i < count; i++) {
+ size_t count = pElement->CountAttrs();
+ for (size_t i = 0; i < count; ++i) {
ByteString space;
ByteString name;
WideString value;
@@ -106,8 +105,8 @@ bool CheckSharedForm(const CXML_Element* pElement, ByteString cbName) {
}
}
- uint32_t nCount = pElement->CountChildren();
- for (i = 0; i < (int)nCount; i++) {
+ size_t nCount = pElement->CountChildren();
+ for (size_t i = 0; i < nCount; ++i) {
CXML_Element* pChild = ToElement(pElement->GetChild(i));
if (pChild && CheckSharedForm(pChild, cbName))
return true;
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index 650db5438b..f2ed03dea4 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -56,15 +56,15 @@ void CPWL_Edit::SetText(const WideString& csText) {
swText.clear();
bool bFirst = true;
- int32_t nCount = pXML->CountChildren();
- for (int32_t i = 0; i < nCount; i++) {
+ size_t nCount = pXML->CountChildren();
+ for (size_t i = 0; i < nCount; ++i) {
CXML_Element* pSubElement = ToElement(pXML->GetChild(i));
if (!pSubElement || !pSubElement->GetTagName().EqualNoCase("p"))
continue;
WideString swSection;
- int nSubChild = pSubElement->CountChildren();
- for (int32_t j = 0; j < nSubChild; j++) {
+ size_t nSubChild = pSubElement->CountChildren();
+ for (size_t j = 0; j < nSubChild; ++j) {
CXML_Content* pSubContent = ToContent(pSubElement->GetChild(j));
if (pSubContent)
swSection += pSubContent->m_Content;