Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: core/src/fpdfapi/fpdf_font/fpdf_font.cpp

Issue 1542193002: Merge to XFA: Add ContainsKey() and ContainsValue() and use them where appropriate. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_font/ttgsubtable.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_font/fpdf_font.cpp
diff --git a/core/src/fpdfapi/fpdf_font/fpdf_font.cpp b/core/src/fpdfapi/fpdf_font/fpdf_font.cpp
index 7b3f8055fbc3340772214b88f7bb88f78ba7b06f..a3de6f2777ab1feb202876af23d63e6b63c2d762 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) {
« no previous file with comments | « no previous file | core/src/fpdfapi/fpdf_font/ttgsubtable.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698