From 1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 3 Apr 2017 15:05:11 -0400 Subject: Drop FXSYS_ from mem methods This Cl drops the FXSYS_ from mem methods which are the same on all platforms. Bug: pdfium:694 Change-Id: I9d5ae905997dbaaec5aa0b2ae4c07358ed9c6236 Reviewed-on: https://pdfium-review.googlesource.com/3613 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- fpdfsdk/cpdfsdk_interform.cpp | 2 +- fpdfsdk/fpdf_structtree.cpp | 2 +- fpdfsdk/fpdfdoc.cpp | 6 +++--- fpdfsdk/fpdfformfill.cpp | 14 +++++++------- fpdfsdk/fpdftext.cpp | 10 +++++----- fpdfsdk/fpdfview.cpp | 8 ++++---- fpdfsdk/fxedit/fxet_list.h | 2 +- 7 files changed, 22 insertions(+), 22 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/cpdfsdk_interform.cpp b/fpdfsdk/cpdfsdk_interform.cpp index 635a534297..b44002cef8 100644 --- a/fpdfsdk/cpdfsdk_interform.cpp +++ b/fpdfsdk/cpdfsdk_interform.cpp @@ -494,7 +494,7 @@ bool CPDFSDK_InterForm::FDFToURLEncodedData(uint8_t*& pBuf, nBufSize = fdfEncodedData.GetLength(); pBuf = FX_Alloc(uint8_t, nBufSize); - FXSYS_memcpy(pBuf, fdfEncodedData.GetBuffer(), nBufSize); + memcpy(pBuf, fdfEncodedData.GetBuffer(), nBufSize); return true; } diff --git a/fpdfsdk/fpdf_structtree.cpp b/fpdfsdk/fpdf_structtree.cpp index 5a922a1c3b..06713fba1d 100644 --- a/fpdfsdk/fpdf_structtree.cpp +++ b/fpdfsdk/fpdf_structtree.cpp @@ -68,7 +68,7 @@ FPDF_StructElement_GetAltText(FPDF_STRUCTELEMENT struct_element, CFX_ByteString encodedStr = str.UTF16LE_Encode(); const unsigned long len = encodedStr.GetLength(); if (buffer && len <= buflen) - FXSYS_memcpy(buffer, encodedStr.c_str(), len); + memcpy(buffer, encodedStr.c_str(), len); return len; } diff --git a/fpdfsdk/fpdfdoc.cpp b/fpdfsdk/fpdfdoc.cpp index 39c7602565..0c8e26ceac 100644 --- a/fpdfsdk/fpdfdoc.cpp +++ b/fpdfsdk/fpdfdoc.cpp @@ -66,7 +66,7 @@ unsigned long Utf16EncodeMaybeCopyAndReturnLength(const CFX_WideString& text, CFX_ByteString encodedText = text.UTF16LE_Encode(); unsigned long len = encodedText.GetLength(); if (buffer && len <= buflen) - FXSYS_memcpy(buffer, encodedText.c_str(), len); + memcpy(buffer, encodedText.c_str(), len); return len; } @@ -188,7 +188,7 @@ DLLEXPORT unsigned long STDCALL FPDFAction_GetFilePath(FPDF_ACTION pDict, CFX_ByteString path = action.GetFilePath().UTF8Encode(); unsigned long len = path.GetLength() + 1; if (buffer && len <= buflen) - FXSYS_memcpy(buffer, path.c_str(), len); + memcpy(buffer, path.c_str(), len); return len; } @@ -205,7 +205,7 @@ DLLEXPORT unsigned long STDCALL FPDFAction_GetURIPath(FPDF_DOCUMENT document, CFX_ByteString path = action.GetURI(pDoc); unsigned long len = path.GetLength() + 1; if (buffer && len <= buflen) - FXSYS_memcpy(buffer, path.c_str(), len); + memcpy(buffer, path.c_str(), len); return len; } diff --git a/fpdfsdk/fpdfformfill.cpp b/fpdfsdk/fpdfformfill.cpp index 6e31e1f045..6610f81c65 100644 --- a/fpdfsdk/fpdfformfill.cpp +++ b/fpdfsdk/fpdfformfill.cpp @@ -489,9 +489,9 @@ DLLEXPORT void STDCALL FPDF_Widget_Copy(FPDF_DOCUMENT document, uint32_t real_size = len < *size ? len : *size; if (real_size > 0) { - FXSYS_memcpy((void*)wsText, - bsCpText.GetBuffer(real_size * sizeof(unsigned short)), - real_size * sizeof(unsigned short)); + memcpy((void*)wsText, + bsCpText.GetBuffer(real_size * sizeof(unsigned short)), + real_size * sizeof(unsigned short)); bsCpText.ReleaseBuffer(real_size * sizeof(unsigned short)); } *size = real_size; @@ -521,9 +521,9 @@ DLLEXPORT void STDCALL FPDF_Widget_Cut(FPDF_DOCUMENT document, uint32_t real_size = len < *size ? len : *size; if (real_size > 0) { - FXSYS_memcpy((void*)wsText, - bsCpText.GetBuffer(real_size * sizeof(unsigned short)), - real_size * sizeof(unsigned short)); + memcpy((void*)wsText, + bsCpText.GetBuffer(real_size * sizeof(unsigned short)), + real_size * sizeof(unsigned short)); bsCpText.ReleaseBuffer(real_size * sizeof(unsigned short)); } *size = real_size; @@ -615,7 +615,7 @@ FPDF_StringHandleGetStringByIndex(FPDF_STRINGHANDLE sHandle, uint32_t real_size = len < *size ? len : *size; if (real_size > 0) - FXSYS_memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size); + memcpy((void*)bsText, (*sSuggestWords)[index].c_str(), real_size); *size = real_size; return true; } diff --git a/fpdfsdk/fpdftext.cpp b/fpdfsdk/fpdftext.cpp index cbb682d85a..5abd232b53 100644 --- a/fpdfsdk/fpdftext.cpp +++ b/fpdfsdk/fpdftext.cpp @@ -155,8 +155,8 @@ DLLEXPORT int STDCALL FPDFText_GetText(FPDF_TEXTPAGE text_page, str = str.Left(count); CFX_ByteString cbUTF16str = str.UTF16LE_Encode(); - FXSYS_memcpy(result, cbUTF16str.GetBuffer(cbUTF16str.GetLength()), - cbUTF16str.GetLength()); + memcpy(result, cbUTF16str.GetBuffer(cbUTF16str.GetLength()), + cbUTF16str.GetLength()); cbUTF16str.ReleaseBuffer(cbUTF16str.GetLength()); return cbUTF16str.GetLength() / sizeof(unsigned short); @@ -210,8 +210,8 @@ DLLEXPORT int STDCALL FPDFText_GetBoundedText(FPDF_TEXTPAGE text_page, CFX_ByteString cbUTF16Str = str.UTF16LE_Encode(); int len = cbUTF16Str.GetLength() / sizeof(unsigned short); int size = buflen > len ? len : buflen; - FXSYS_memcpy(buffer, cbUTF16Str.GetBuffer(size * sizeof(unsigned short)), - size * sizeof(unsigned short)); + memcpy(buffer, cbUTF16Str.GetBuffer(size * sizeof(unsigned short)), + size * sizeof(unsigned short)); cbUTF16Str.ReleaseBuffer(size * sizeof(unsigned short)); return size; @@ -311,7 +311,7 @@ DLLEXPORT int STDCALL FPDFLink_GetURL(FPDF_PAGELINK link_page, int size = std::min(required, buflen); if (size > 0) { int buf_size = size * sizeof(unsigned short); - FXSYS_memcpy(buffer, cbUTF16URL.GetBuffer(buf_size), buf_size); + memcpy(buffer, cbUTF16URL.GetBuffer(buf_size), buf_size); } return size; } diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index e9ae68cf5e..d94bec688b 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -565,7 +565,7 @@ class CMemFile final : public IFX_SeekableReadStream { if (!newPos.IsValid() || newPos.ValueOrDie() > m_size) return false; - FXSYS_memcpy(buffer, m_pBuf + offset, size); + memcpy(buffer, m_pBuf + offset, size); return true; } @@ -734,7 +734,7 @@ DLLEXPORT void STDCALL FPDF_RenderPage(HDC dc, auto pDst = pdfium::MakeRetain(); int pitch = pBitmap->GetPitch(); pDst->Create(size_x, size_y, FXDIB_Rgb32); - FXSYS_memset(pDst->GetBuffer(), -1, pitch * size_y); + memset(pDst->GetBuffer(), -1, pitch * size_y); pDst->CompositeBitmap(0, 0, size_x, size_y, pBitmap, 0, 0, FXDIB_BLEND_NORMAL, nullptr, false, nullptr); WinDC.StretchDIBits(pDst, 0, 0, size_x, size_y); @@ -1164,7 +1164,7 @@ DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Init(FPDF_BSTR* str) { if (!str) return -1; - FXSYS_memset(str, 0, sizeof(FPDF_BSTR)); + memset(str, 0, sizeof(FPDF_BSTR)); return 0; } @@ -1193,7 +1193,7 @@ DLLEXPORT FPDF_RESULT STDCALL FPDF_BStr_Set(FPDF_BSTR* str, str->str = FX_Alloc(char, length + 1); str->str[length] = 0; - FXSYS_memcpy(str->str, bstr, length); + memcpy(str->str, bstr, length); str->len = length; return 0; diff --git a/fpdfsdk/fxedit/fxet_list.h b/fpdfsdk/fxedit/fxet_list.h index d0fef1ca4b..50e43c9d2f 100644 --- a/fpdfsdk/fxedit/fxet_list.h +++ b/fpdfsdk/fxedit/fxet_list.h @@ -53,7 +53,7 @@ class CLST_Rect : public CFX_FloatRect { } bool operator==(const CLST_Rect& rect) const { - return FXSYS_memcmp(this, &rect, sizeof(CLST_Rect)) == 0; + return memcmp(this, &rect, sizeof(CLST_Rect)) == 0; } bool operator!=(const CLST_Rect& rect) const { return !(*this == rect); } -- cgit v1.2.3