summaryrefslogtreecommitdiff
path: root/fxjs
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-11-27 18:37:46 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-11-27 18:37:46 +0000
commit4f1c7f33f765b7cf5d8770d725054f74073bab39 (patch)
treeffa459a98d5fae60ffa524aa71b22d6e49301eca /fxjs
parent2d950563beb291441c0e1c90cfde8227f7025327 (diff)
downloadpdfium-4f1c7f33f765b7cf5d8770d725054f74073bab39.tar.xz
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 <dsinclair@chromium.org> Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'fxjs')
-rw-r--r--fxjs/cjs_document.cpp4
1 files changed, 2 insertions, 2 deletions
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;