diff options
Diffstat (limited to 'fpdfsdk/javascript')
-rw-r--r-- | fpdfsdk/javascript/Document.cpp | 4 | ||||
-rw-r--r-- | fpdfsdk/javascript/JS_Value.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/fpdfsdk/javascript/Document.cpp b/fpdfsdk/javascript/Document.cpp index 0b793db049..70b4ef7e03 100644 --- a/fpdfsdk/javascript/Document.cpp +++ b/fpdfsdk/javascript/Document.cpp @@ -1460,7 +1460,7 @@ int Document::CountWords(CPDF_TextObject* pTextObj) { FX_BOOL bIsLatin = FALSE; for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { - uint32_t charcode = static_cast<uint32_t>(-1); + uint32_t charcode = CPDF_Font::kInvalidCharCode; FX_FLOAT kerning; pTextObj->GetCharInfo(i, charcode, kerning); @@ -1493,7 +1493,7 @@ CFX_WideString Document::GetObjWordStr(CPDF_TextObject* pTextObj, FX_BOOL bIsLatin = FALSE; for (int i = 0, sz = pTextObj->CountChars(); i < sz; i++) { - uint32_t charcode = static_cast<uint32_t>(-1); + uint32_t charcode = CPDF_Font::kInvalidCharCode; FX_FLOAT kerning; pTextObj->GetCharInfo(i, charcode, kerning); diff --git a/fpdfsdk/javascript/JS_Value.cpp b/fpdfsdk/javascript/JS_Value.cpp index 1d57833247..4d2a1d44a8 100644 --- a/fpdfsdk/javascript/JS_Value.cpp +++ b/fpdfsdk/javascript/JS_Value.cpp @@ -893,7 +893,7 @@ std::vector<CJS_Value> JS_ExpandKeywordParams( va_list ap; va_start(ap, nKeywords); - for (int i = 0; i < nKeywords; ++i) { + for (size_t i = 0; i < nKeywords; ++i) { const wchar_t* property = va_arg(ap, const wchar_t*); v8::Local<v8::Value> v8Value = FXJS_GetObjectElement(pRuntime->GetIsolate(), pObj, property); |