summaryrefslogtreecommitdiff
path: root/core/src/fpdfapi/fpdf_font
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/fpdfapi/fpdf_font')
-rw-r--r--core/src/fpdfapi/fpdf_font/fpdf_font.cpp3
-rw-r--r--core/src/fpdfapi/fpdf_font/ttgsubtable.cpp3
2 files changed, 4 insertions, 2 deletions
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 7b3f8055fb..a3de6f2777 100644
--- a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -13,6 +13,7 @@
#include "core/include/fpdfapi/fpdf_resource.h"
#include "core/include/fxcrt/fx_ext.h"
#include "core/include/fxge/fx_freetype.h"
+#include "third_party/base/stl_util.h"
#if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_
#include "core/src/fxge/apple/apple_int.h"
@@ -1727,7 +1728,7 @@ CPDF_Type3Char* CPDF_Type3Font::LoadChar(FX_DWORD charcode, int level) {
rcBBox.top = FXSYS_round(char_rect.top * 1000);
rcBBox.bottom = FXSYS_round(char_rect.bottom * 1000);
- FXSYS_assert(m_CacheMap.find(charcode) == m_CacheMap.end());
+ ASSERT(!pdfium::ContainsKey(m_CacheMap, charcode));
CPDF_Type3Char* pCachedChar = pNewChar.release();
m_CacheMap[charcode] = pCachedChar;
if (pCachedChar->m_pForm->CountObjects() == 0) {
diff --git a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
index 035ea8a0ff..b10aa6952a 100644
--- a/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
+++ b/core/src/fpdfapi/fpdf_font/ttgsubtable.cpp
@@ -9,6 +9,7 @@
#include "core/include/fxge/fx_freetype.h"
#include "core/include/fxge/fx_ge.h"
#include "third_party/base/nonstd_unique_ptr.h"
+#include "third_party/base/stl_util.h"
CFX_GlyphMap::CFX_GlyphMap() {}
CFX_GlyphMap::~CFX_GlyphMap() {}
@@ -86,7 +87,7 @@ bool CFX_CTTGSUBTable::GetVerticalGlyph(uint32_t glyphnum,
k);
if (FeatureList.FeatureRecord[index].FeatureTag == tag[0] ||
FeatureList.FeatureRecord[index].FeatureTag == tag[1]) {
- if (m_featureMap.find(index) == m_featureMap.end()) {
+ if (!pdfium::ContainsKey(m_featureMap, index)) {
m_featureMap[index] = index;
}
}