diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-03 15:05:11 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-03 20:39:56 +0000 |
commit | 1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca (patch) | |
tree | 315955cce6b29093dcddfc48c0811957a172bedf /core/fpdfapi/font | |
parent | 2ae80f52cec81c080515724f99deb06b2fee3cc9 (diff) | |
download | pdfium-1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca.tar.xz |
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 <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/font')
-rw-r--r-- | core/fpdfapi/font/cpdf_fontencoding.cpp | 7 | ||||
-rw-r--r-- | core/fpdfapi/font/cpdf_simplefont.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/font/cpdf_type1font.cpp | 12 | ||||
-rw-r--r-- | core/fpdfapi/font/cpdf_type3font.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/font/fpdf_font.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/font/fpdf_font_cid.cpp | 10 |
6 files changed, 20 insertions, 21 deletions
diff --git a/core/fpdfapi/font/cpdf_fontencoding.cpp b/core/fpdfapi/font/cpdf_fontencoding.cpp index be4eaff13b..2cc6445ab2 100644 --- a/core/fpdfapi/font/cpdf_fontencoding.cpp +++ b/core/fpdfapi/font/cpdf_fontencoding.cpp @@ -1646,7 +1646,7 @@ uint32_t PDF_FindCode(const uint16_t* pCodes, uint16_t unicode) { } // namespace CPDF_FontEncoding::CPDF_FontEncoding() { - FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes)); + memset(m_Unicodes, 0, sizeof(m_Unicodes)); } int CPDF_FontEncoding::CharCodeFromUnicode(wchar_t unicode) const { @@ -1660,7 +1660,7 @@ int CPDF_FontEncoding::CharCodeFromUnicode(wchar_t unicode) const { CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) { const uint16_t* pSrc = PDF_UnicodesForPredefinedCharSet(PredefinedEncoding); if (!pSrc) { - FXSYS_memset(m_Unicodes, 0, sizeof(m_Unicodes)); + memset(m_Unicodes, 0, sizeof(m_Unicodes)); } else { for (int i = 0; i < 256; i++) m_Unicodes[i] = pSrc[i]; @@ -1668,8 +1668,7 @@ CPDF_FontEncoding::CPDF_FontEncoding(int PredefinedEncoding) { } bool CPDF_FontEncoding::IsIdentical(CPDF_FontEncoding* pAnother) const { - return FXSYS_memcmp(m_Unicodes, pAnother->m_Unicodes, sizeof(m_Unicodes)) == - 0; + return memcmp(m_Unicodes, pAnother->m_Unicodes, sizeof(m_Unicodes)) == 0; } std::unique_ptr<CPDF_Object> CPDF_FontEncoding::Realize( diff --git a/core/fpdfapi/font/cpdf_simplefont.cpp b/core/fpdfapi/font/cpdf_simplefont.cpp index 94a690f221..a3597824bd 100644 --- a/core/fpdfapi/font/cpdf_simplefont.cpp +++ b/core/fpdfapi/font/cpdf_simplefont.cpp @@ -13,9 +13,9 @@ #include "third_party/base/numerics/safe_math.h" CPDF_SimpleFont::CPDF_SimpleFont() : m_BaseEncoding(PDFFONT_ENCODING_BUILTIN) { - FXSYS_memset(m_CharWidth, 0xff, sizeof(m_CharWidth)); - FXSYS_memset(m_GlyphIndex, 0xff, sizeof(m_GlyphIndex)); - FXSYS_memset(m_ExtGID, 0xff, sizeof(m_ExtGID)); + memset(m_CharWidth, 0xff, sizeof(m_CharWidth)); + memset(m_GlyphIndex, 0xff, sizeof(m_GlyphIndex)); + memset(m_ExtGID, 0xff, sizeof(m_ExtGID)); for (size_t i = 0; i < FX_ArraySize(m_CharBBox); ++i) m_CharBBox[i] = FX_RECT(-1, -1, -1, -1); } diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp index a264a780c3..e3d96dad37 100644 --- a/core/fpdfapi/font/cpdf_type1font.cpp +++ b/core/fpdfapi/font/cpdf_type1font.cpp @@ -151,7 +151,7 @@ void CPDF_Type1Font::LoadGlyphMap() { if (bGotOne) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ if (!bCoreText) - FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256); + memcpy(m_ExtGID, m_GlyphIndex, 256); #endif return; } @@ -182,7 +182,7 @@ void CPDF_Type1Font::LoadGlyphMap() { } #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ if (!bCoreText) - FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256); + memcpy(m_ExtGID, m_GlyphIndex, 256); #endif return; } @@ -207,7 +207,7 @@ void CPDF_Type1Font::LoadGlyphMap() { FT_UnicodeFromCharCode(PDFFONT_ENCODING_STANDARD, charcode); } char name_glyph[256]; - FXSYS_memset(name_glyph, 0, sizeof(name_glyph)); + memset(name_glyph, 0, sizeof(name_glyph)); FXFT_Get_Glyph_Name(m_Font.GetFace(), m_GlyphIndex[charcode], name_glyph, 256); name_glyph[255] = 0; @@ -272,7 +272,7 @@ void CPDF_Type1Font::LoadGlyphMap() { FT_UnicodeFromCharCode(PDFFONT_ENCODING_STANDARD, charcode); if (unicode == 0) { char name_glyph[256]; - FXSYS_memset(name_glyph, 0, sizeof(name_glyph)); + memset(name_glyph, 0, sizeof(name_glyph)); FXFT_Get_Glyph_Name(m_Font.GetFace(), m_GlyphIndex[charcode], name_glyph, 256); name_glyph[255] = 0; @@ -286,7 +286,7 @@ void CPDF_Type1Font::LoadGlyphMap() { } #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ if (!bCoreText) - FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256); + memcpy(m_ExtGID, m_GlyphIndex, 256); #endif return; @@ -315,7 +315,7 @@ void CPDF_Type1Font::LoadGlyphMap() { } #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ if (!bCoreText) - FXSYS_memcpy(m_ExtGID, m_GlyphIndex, 256); + memcpy(m_ExtGID, m_GlyphIndex, 256); #endif } diff --git a/core/fpdfapi/font/cpdf_type3font.cpp b/core/fpdfapi/font/cpdf_type3font.cpp index 59702aed6a..da3b183c13 100644 --- a/core/fpdfapi/font/cpdf_type3font.cpp +++ b/core/fpdfapi/font/cpdf_type3font.cpp @@ -24,7 +24,7 @@ CPDF_Type3Font::CPDF_Type3Font() m_pPageResources(nullptr), m_pFontResources(nullptr), m_CharLoadingDepth(0) { - FXSYS_memset(m_CharWidthL, 0, sizeof(m_CharWidthL)); + memset(m_CharWidthL, 0, sizeof(m_CharWidthL)); } CPDF_Type3Font::~CPDF_Type3Font() {} diff --git a/core/fpdfapi/font/fpdf_font.cpp b/core/fpdfapi/font/fpdf_font.cpp index 706ae62cd9..23b46759d8 100644 --- a/core/fpdfapi/font/fpdf_font.cpp +++ b/core/fpdfapi/font/fpdf_font.cpp @@ -71,8 +71,8 @@ CPDF_Font* CFX_StockFontArray::SetFont(uint32_t index, } CPDF_FontGlobals::CPDF_FontGlobals() { - FXSYS_memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets)); - FXSYS_memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes)); + memset(m_EmbeddedCharsets, 0, sizeof(m_EmbeddedCharsets)); + memset(m_EmbeddedToUnicodes, 0, sizeof(m_EmbeddedToUnicodes)); } CPDF_FontGlobals::~CPDF_FontGlobals() {} diff --git a/core/fpdfapi/font/fpdf_font_cid.cpp b/core/fpdfapi/font/fpdf_font_cid.cpp index ddc0c12b7d..64b041738e 100644 --- a/core/fpdfapi/font/fpdf_font_cid.cpp +++ b/core/fpdfapi/font/fpdf_font_cid.cpp @@ -413,8 +413,8 @@ void CPDF_CMapParser::ParseWord(const CFX_ByteStringC& word) { FX_Free(m_pCMap->m_pLeadingBytes); m_pCMap->m_pLeadingBytes = FX_Alloc2D(uint8_t, nSegs, sizeof(CMap_CodeRange)); - FXSYS_memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.data(), - nSegs * sizeof(CMap_CodeRange)); + memcpy(m_pCMap->m_pLeadingBytes, m_CodeRanges.data(), + nSegs * sizeof(CMap_CodeRange)); } else if (nSegs == 1) { m_pCMap->m_CodingScheme = (m_CodeRanges[0].m_CharSize == 2) ? CPDF_CMap::TwoBytes @@ -577,8 +577,8 @@ void CPDF_CMap::LoadEmbedded(const uint8_t* pData, uint32_t size) { if (m_CodingScheme == MixedFourBytes && parser.m_AddMaps.GetSize()) { m_pAddMapping = FX_Alloc(uint8_t, parser.m_AddMaps.GetSize() + 4); *(uint32_t*)m_pAddMapping = parser.m_AddMaps.GetSize() / 8; - FXSYS_memcpy(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(), - parser.m_AddMaps.GetSize()); + memcpy(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(), + parser.m_AddMaps.GetSize()); FXSYS_qsort(m_pAddMapping + 4, parser.m_AddMaps.GetSize() / 8, 8, CompareDWORD); } @@ -720,7 +720,7 @@ int CPDF_CMap::AppendChar(char* str, uint32_t charcode) const { iSize = 1; } if (iSize > 1) { - FXSYS_memset(str, 0, sizeof(uint8_t) * iSize); + memset(str, 0, sizeof(uint8_t) * iSize); } str[iSize - 1] = (uint8_t)charcode; return iSize; |