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

Unified Diff: core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp

Issue 2340513002: Remove more strcmp/memcmp usage. (Closed)
Patch Set: Nit Created 4 years, 3 months 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 | « core/fpdfapi/fpdf_cmaps/cmap_int.h ('k') | core/fpdfapi/fpdf_font/font_int.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
diff --git a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
index 1e0250c1af646194fae7f42eab2df001ed01c7f9..caf234badb763a435d346c7336bf0d88e67deefb 100644
--- a/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
+++ b/core/fpdfapi/fpdf_cmaps/fpdf_cmaps.cpp
@@ -53,7 +53,7 @@ static int compareDWordSingle(const void* p1, const void* p2) {
}; // extern "C"
-void FPDFAPI_FindEmbeddedCMap(const char* name,
+void FPDFAPI_FindEmbeddedCMap(const CFX_ByteString& bsName,
int charset,
int coding,
const FXCMAP_CMap*& pMap) {
@@ -64,10 +64,10 @@ void FPDFAPI_FindEmbeddedCMap(const char* name,
pFontGlobals->m_EmbeddedCharsets[charset].m_pMapList;
for (uint32_t i = 0; i < pFontGlobals->m_EmbeddedCharsets[charset].m_Count;
i++) {
- if (FXSYS_strcmp(name, pCMaps[i].m_Name))
- continue;
- pMap = &pCMaps[i];
- break;
+ if (bsName == pCMaps[i].m_Name) {
+ pMap = &pCMaps[i];
+ break;
+ }
}
}
« no previous file with comments | « core/fpdfapi/fpdf_cmaps/cmap_int.h ('k') | core/fpdfapi/fpdf_font/font_int.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698