From 4f1c7f33f765b7cf5d8770d725054f74073bab39 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 27 Nov 2017 18:37:46 +0000 Subject: Convert CPDF_TextObject to not use CollectionSize This CL updates various methods in CPDF_TextObject to return or received size_t values. Callers have been updated as needed. Bug: pdfium:774 Change-Id: Id72511bc74637c6261add39f5414c9a4b8390b82 Reviewed-on: https://pdfium-review.googlesource.com/19430 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison --- fxjs/cjs_document.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fxjs/cjs_document.cpp') diff --git a/fxjs/cjs_document.cpp b/fxjs/cjs_document.cpp index 4885d68e1b..46ece171b0 100644 --- a/fxjs/cjs_document.cpp +++ b/fxjs/cjs_document.cpp @@ -1335,7 +1335,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) { bool bIsLatin = false; - for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { + for (size_t i = 0, sz = pTextObj->CountChars(); i < sz; ++i) { uint32_t charcode = CPDF_Font::kInvalidCharCode; float kerning; @@ -1367,7 +1367,7 @@ WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, int nWordIndex) { int nWords = 0; bool bIsLatin = false; - for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { + for (size_t i = 0, sz = pTextObj->CountChars(); i < sz; ++i) { uint32_t charcode = CPDF_Font::kInvalidCharCode; float kerning; -- cgit v1.2.3