diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-04-03 15:10:29 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-03 20:45:01 +0000 |
commit | 6da8ac5053e9ebf7c4ce0d9d67b0443d3f8f6084 (patch) | |
tree | 952cc0bec2108191bba09aba6f09b9cf8c22e10e /core/fpdfapi | |
parent | 1c5d0b48ec7a6443ba72fec2a58a65fc6d694aca (diff) | |
download | pdfium-6da8ac5053e9ebf7c4ce0d9d67b0443d3f8f6084.tar.xz |
Drop FXSYS_ from util methods
This Cl drops the FXSYS_ from utility methods which are the same on all
platforms.
Bug: pdfium:694
Change-Id: I0859b60c5ba7af68c929a519dd76f48c27a6c896
Reviewed-on: https://pdfium-review.googlesource.com/3614
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi')
-rw-r--r-- | core/fpdfapi/cmaps/fpdf_cmaps.cpp | 14 | ||||
-rw-r--r-- | core/fpdfapi/font/cpdf_type1font.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/font/fpdf_font_cid.cpp | 7 | ||||
-rw-r--r-- | core/fpdfapi/font/ttgsubtable.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_pagerendercache.cpp | 2 |
5 files changed, 17 insertions, 18 deletions
diff --git a/core/fpdfapi/cmaps/fpdf_cmaps.cpp b/core/fpdfapi/cmaps/fpdf_cmaps.cpp index ca01d431f4..cb2f09fb3c 100644 --- a/core/fpdfapi/cmaps/fpdf_cmaps.cpp +++ b/core/fpdfapi/cmaps/fpdf_cmaps.cpp @@ -76,15 +76,15 @@ uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, uint32_t charcode) { while (1) { if (pMap->m_DWordMapType == FXCMAP_CMap::Range) { uint16_t* found = static_cast<uint16_t*>( - FXSYS_bsearch(&charcode, pMap->m_pDWordMap, pMap->m_DWordCount, 8, - compareDWordRange)); + bsearch(&charcode, pMap->m_pDWordMap, pMap->m_DWordCount, 8, + compareDWordRange)); if (found) return found[3] + (uint16_t)charcode - found[1]; } else if (pMap->m_DWordMapType == FXCMAP_CMap::Single) { uint16_t* found = static_cast<uint16_t*>( - FXSYS_bsearch(&charcode, pMap->m_pDWordMap, pMap->m_DWordCount, 6, - compareDWordSingle)); + bsearch(&charcode, pMap->m_pDWordMap, pMap->m_DWordCount, 6, + compareDWordSingle)); if (found) return found[2]; } @@ -101,13 +101,13 @@ uint16_t FPDFAPI_CIDFromCharCode(const FXCMAP_CMap* pMap, uint32_t charcode) { if (!pMap->m_pWordMap) return 0; if (pMap->m_WordMapType == FXCMAP_CMap::Single) { - uint16_t* found = static_cast<uint16_t*>(FXSYS_bsearch( - &code, pMap->m_pWordMap, pMap->m_WordCount, 4, compareWord)); + uint16_t* found = static_cast<uint16_t*>( + bsearch(&code, pMap->m_pWordMap, pMap->m_WordCount, 4, compareWord)); if (found) return found[1]; } else if (pMap->m_WordMapType == FXCMAP_CMap::Range) { - uint16_t* found = static_cast<uint16_t*>(FXSYS_bsearch( + uint16_t* found = static_cast<uint16_t*>(bsearch( &code, pMap->m_pWordMap, pMap->m_WordCount, 6, compareWordRange)); if (found) return found[2] + code - found[0]; diff --git a/core/fpdfapi/font/cpdf_type1font.cpp b/core/fpdfapi/font/cpdf_type1font.cpp index e3d96dad37..ac0aed4050 100644 --- a/core/fpdfapi/font/cpdf_type1font.cpp +++ b/core/fpdfapi/font/cpdf_type1font.cpp @@ -35,9 +35,9 @@ int compareString(const void* key, const void* element) { } const char* GlyphNameRemap(const char* pStrAdobe) { - const GlyphNameMap* found = static_cast<const GlyphNameMap*>(FXSYS_bsearch( - pStrAdobe, g_GlyphNameSubsts, FX_ArraySize(g_GlyphNameSubsts), - sizeof(GlyphNameMap), compareString)); + const GlyphNameMap* found = static_cast<const GlyphNameMap*>( + bsearch(pStrAdobe, g_GlyphNameSubsts, FX_ArraySize(g_GlyphNameSubsts), + sizeof(GlyphNameMap), compareString)); return found ? found->m_pStrUnicode : nullptr; } diff --git a/core/fpdfapi/font/fpdf_font_cid.cpp b/core/fpdfapi/font/fpdf_font_cid.cpp index 64b041738e..434fe62ede 100644 --- a/core/fpdfapi/font/fpdf_font_cid.cpp +++ b/core/fpdfapi/font/fpdf_font_cid.cpp @@ -579,8 +579,7 @@ void CPDF_CMap::LoadEmbedded(const uint8_t* pData, uint32_t size) { *(uint32_t*)m_pAddMapping = parser.m_AddMaps.GetSize() / 8; memcpy(m_pAddMapping + 4, parser.m_AddMaps.GetBuffer(), parser.m_AddMaps.GetSize()); - FXSYS_qsort(m_pAddMapping + 4, parser.m_AddMaps.GetSize() / 8, 8, - CompareDWORD); + qsort(m_pAddMapping + 4, parser.m_AddMaps.GetSize() / 8, 8, CompareDWORD); } } @@ -596,8 +595,8 @@ uint16_t CPDF_CMap::CIDFromCharCode(uint32_t charcode) const { } if (charcode >> 16) { if (m_pAddMapping) { - void* found = FXSYS_bsearch(&charcode, m_pAddMapping + 4, - *(uint32_t*)m_pAddMapping, 8, CompareCID); + void* found = bsearch(&charcode, m_pAddMapping + 4, + *(uint32_t*)m_pAddMapping, 8, CompareCID); if (!found) return 0; return (uint16_t)(((uint32_t*)found)[1] % 65536 + charcode - diff --git a/core/fpdfapi/font/ttgsubtable.cpp b/core/fpdfapi/font/ttgsubtable.cpp index 4fae5d41d2..d2a6b9ab52 100644 --- a/core/fpdfapi/font/ttgsubtable.cpp +++ b/core/fpdfapi/font/ttgsubtable.cpp @@ -49,9 +49,9 @@ void CFX_GlyphMap::SetAt(int key, int value) { } bool CFX_GlyphMap::Lookup(int key, int& value) { - void* pResult = FXSYS_bsearch(&key, m_Buffer.GetBuffer(), - m_Buffer.GetSize() / sizeof(_IntPair), - sizeof(_IntPair), _CompareInt); + void* pResult = + bsearch(&key, m_Buffer.GetBuffer(), m_Buffer.GetSize() / sizeof(_IntPair), + sizeof(_IntPair), _CompareInt); if (!pResult) { return false; } diff --git a/core/fpdfapi/render/cpdf_pagerendercache.cpp b/core/fpdfapi/render/cpdf_pagerendercache.cpp index 6e6250b1c0..549f466527 100644 --- a/core/fpdfapi/render/cpdf_pagerendercache.cpp +++ b/core/fpdfapi/render/cpdf_pagerendercache.cpp @@ -48,7 +48,7 @@ void CPDF_PageRenderCache::CacheOptimization(int32_t dwLimitCacheSize) { pCACHEINFO[i].time = it.second->GetTimeCount(); pCACHEINFO[i++].pStream = it.second->GetStream(); } - FXSYS_qsort(pCACHEINFO, nCount, sizeof(CACHEINFO), compare); + qsort(pCACHEINFO, nCount, sizeof(CACHEINFO), compare); uint32_t nTimeCount = m_nTimeCount; // Check if time value is about to roll over and reset all entries. |