diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-27 10:53:11 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-27 16:11:38 +0000 |
commit | 875e98c581952478f3a3ccef9b2f2e3ed06c5346 (patch) | |
tree | 8e0d7e032056bf4c73d6da43c0f3ce4eadb74dfd /core/fpdfapi/parser | |
parent | cc3a3ee3ebcc1baabdfa7ffca5876dbbfa3980c1 (diff) | |
download | pdfium-875e98c581952478f3a3ccef9b2f2e3ed06c5346.tar.xz |
Remove FX_STRSIZE and replace with size_t
BUG=pdfium:828
Change-Id: I5c40237433ebabaeabdb43aec9cdf783e41dfe16
Reviewed-on: https://pdfium-review.googlesource.com/13230
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/parser')
-rw-r--r-- | core/fpdfapi/parser/cpdf_simple_parser.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/parser/fpdf_parser_decode_unittest.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/parser/fpdf_parser_utility.cpp | 2 |
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; } |