diff options
author | Lei Zhang <thestig@chromium.org> | 2015-12-22 13:48:10 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2015-12-22 13:48:10 -0800 |
commit | 1fc92867ca53f0fba4272fbee3814d844f487495 (patch) | |
tree | 8c81760b66d1e8da186bddc52d38f350f4e85bf1 /core/src/fpdfapi/fpdf_font/fpdf_font.cpp | |
parent | f6dafc90ec1a0df8d618efc68c0223f0cdd80ffb (diff) | |
download | pdfium-1fc92867ca53f0fba4272fbee3814d844f487495.tar.xz |
Add ContainsKey() and ContainsValue() and use them where appropriate.
R=ochang@chromium.org
Review URL: https://codereview.chromium.org/1540263003 .
Diffstat (limited to 'core/src/fpdfapi/fpdf_font/fpdf_font.cpp')
-rw-r--r-- | core/src/fpdfapi/fpdf_font/fpdf_font.cpp | 3 |
1 files changed, 2 insertions, 1 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) { |