From 8b1408e7053247def45659515cda19a64a7fccd5 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 27 Sep 2017 11:07:51 -0400 Subject: Remove FXSYS_strlen and FXSYS_wcslen With the conversion of internal string sizes to size_t, these wrappers are no longer needed. Replacing them with strlen and wcslen respectively. BUG=pdfium:828 Change-Id: Ia087ca2ddaf688a57ec9bd9ddfb8533cbe41510d Reviewed-on: https://pdfium-review.googlesource.com/14890 Commit-Queue: Ryan Harrison Reviewed-by: dsinclair --- core/fpdfapi/edit/cpdf_creator.cpp | 6 +++--- core/fpdfapi/parser/fpdf_parser_decode.cpp | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fpdfapi') diff --git a/core/fpdfapi/edit/cpdf_creator.cpp b/core/fpdfapi/edit/cpdf_creator.cpp index 7c567779ff..5f209a634f 100644 --- a/core/fpdfapi/edit/cpdf_creator.cpp +++ b/core/fpdfapi/edit/cpdf_creator.cpp @@ -102,7 +102,7 @@ bool CFX_FileBufferArchive::WriteByte(uint8_t byte) { bool CFX_FileBufferArchive::WriteDWord(uint32_t i) { char buf[32]; FXSYS_itoa(i, buf, 10); - return WriteBlock(buf, static_cast(FXSYS_strlen(buf))); + return WriteBlock(buf, static_cast(strlen(buf))); } bool CFX_FileBufferArchive::WriteString(const ByteStringView& str) { @@ -687,7 +687,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4() { char offset_buf[20]; memset(offset_buf, 0, sizeof(offset_buf)); FXSYS_i64toa(prev, offset_buf, 10); - if (!m_Archive->WriteBlock(offset_buf, FXSYS_strlen(offset_buf))) + if (!m_Archive->WriteBlock(offset_buf, strlen(offset_buf))) return -1; } } @@ -749,7 +749,7 @@ int32_t CPDF_Creator::WriteDoc_Stage4() { char offset_buf[20]; memset(offset_buf, 0, sizeof(offset_buf)); FXSYS_i64toa(m_XrefStart, offset_buf, 10); - if (!m_Archive->WriteBlock(offset_buf, FXSYS_strlen(offset_buf)) || + if (!m_Archive->WriteBlock(offset_buf, strlen(offset_buf)) || !m_Archive->WriteString("\r\n%%EOF\r\n")) { return -1; } diff --git a/core/fpdfapi/parser/fpdf_parser_decode.cpp b/core/fpdfapi/parser/fpdf_parser_decode.cpp index 228c012e5f..7ad6c0176f 100644 --- a/core/fpdfapi/parser/fpdf_parser_decode.cpp +++ b/core/fpdfapi/parser/fpdf_parser_decode.cpp @@ -465,7 +465,7 @@ WideString PDF_DecodeText(const ByteString& bstr) { ByteString PDF_EncodeText(const wchar_t* pString, int len) { if (len == -1) - len = FXSYS_wcslen(pString); + len = wcslen(pString); ByteString result; char* dest_buf1 = result.GetBuffer(len); -- cgit v1.2.3