summaryrefslogtreecommitdiff
path: root/core/fpdfapi/parser
diff options
context:
space:
mode:
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r--core/fpdfapi/parser/cpdf_simple_parser.cpp4
-rw-r--r--core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp4
-rw-r--r--core/fpdfapi/parser/fpdf_parser_utility.cpp2
3 files changed, 5 insertions, 5 deletions
diff --git a/core/fpdfapi/parser/cpdf_simple_parser.cpp b/core/fpdfapi/parser/cpdf_simple_parser.cpp
index d800796d58..5358b183d8 100644
--- a/core/fpdfapi/parser/cpdf_simple_parser.cpp
+++ b/core/fpdfapi/parser/cpdf_simple_parser.cpp
@@ -103,7 +103,7 @@ ByteStringView CPDF_SimpleParser::GetWord() {
m_dwCurPos++;
}
return ByteStringView(pStart,
- (FX_STRSIZE)(m_dwCurPos - (pStart - m_pData)));
+ static_cast<size_t>(m_dwCurPos - (pStart - m_pData)));
}
if (dwSize == 1 && pStart[0] == '(') {
int level = 1;
@@ -131,7 +131,7 @@ ByteStringView CPDF_SimpleParser::GetWord() {
m_dwCurPos++;
}
return ByteStringView(pStart,
- (FX_STRSIZE)(m_dwCurPos - (pStart - m_pData)));
+ static_cast<size_t>(m_dwCurPos - (pStart - m_pData)));
}
return ByteStringView(pStart, dwSize);
}
diff --git a/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp b/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp
index ae30959013..9ab4958825 100644
--- a/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp
@@ -81,7 +81,7 @@ TEST(fpdf_parser_decode, EncodeText) {
struct EncodeTestData {
const wchar_t* input;
const char* expected_output;
- FX_STRSIZE expected_length;
+ size_t expected_length;
} test_data[] = {
// Empty src string.
{L"", "", 0},
@@ -103,7 +103,7 @@ TEST(fpdf_parser_decode, EncodeText) {
ASSERT_EQ(test_case.expected_length, output.GetLength()) << "for case "
<< i;
const char* str_ptr = output.c_str();
- for (FX_STRSIZE j = 0; j < test_case.expected_length; ++j) {
+ for (size_t j = 0; j < test_case.expected_length; ++j) {
EXPECT_EQ(test_case.expected_output[j], str_ptr[j]) << "for case " << i
<< " char " << j;
}
diff --git a/core/fpdfapi/parser/fpdf_parser_utility.cpp b/core/fpdfapi/parser/fpdf_parser_utility.cpp
index e57f834cee..2185e88ff6 100644
--- a/core/fpdfapi/parser/fpdf_parser_utility.cpp
+++ b/core/fpdfapi/parser/fpdf_parser_utility.cpp
@@ -106,7 +106,7 @@ ByteString PDF_NameDecode(const ByteStringView& bstr) {
*pDest++ = bstr[i];
}
}
- result.ReleaseBuffer((FX_STRSIZE)(pDest - pDestStart));
+ result.ReleaseBuffer(static_cast<size_t>(pDest - pDestStart));
return result;
}