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

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

Issue 2060973002: Make code compile with clang_use_chrome_plugin (part I) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: address comments Created 4 years, 6 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_font/font_int.h ('k') | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fpdfapi/fpdf_font/fpdf_font.cpp
diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp
index e5442215c4169e17b585bf67a22a6035ca22f8f6..1735f0ba2579f7ae051dd8cccc979915e3e6892b 100644
--- a/core/fpdfapi/fpdf_font/fpdf_font.cpp
+++ b/core/fpdfapi/fpdf_font/fpdf_font.cpp
@@ -93,7 +93,7 @@ short TT2PDF(int m, FXFT_Face face) {
return (m * 1000 + upm / 2) / upm;
}
-CFX_WideString CPDF_ToUnicodeMap::Lookup(uint32_t charcode) {
+CFX_WideString CPDF_ToUnicodeMap::Lookup(uint32_t charcode) const {
auto it = m_Map.find(charcode);
if (it != m_Map.end()) {
uint32_t value = it->second;
@@ -122,7 +122,7 @@ CFX_WideString CPDF_ToUnicodeMap::Lookup(uint32_t charcode) {
return CFX_WideString();
}
-uint32_t CPDF_ToUnicodeMap::ReverseLookup(FX_WCHAR unicode) {
+uint32_t CPDF_ToUnicodeMap::ReverseLookup(FX_WCHAR unicode) const {
for (const auto& pair : m_Map) {
if (pair.second == static_cast<uint32_t>(unicode))
return pair.first;
@@ -193,6 +193,10 @@ CFX_WideString CPDF_ToUnicodeMap::StringToWideString(
return result;
}
+CPDF_ToUnicodeMap::CPDF_ToUnicodeMap() : m_pBaseMap(nullptr) {}
+
+CPDF_ToUnicodeMap::~CPDF_ToUnicodeMap() {}
+
void CPDF_ToUnicodeMap::Load(CPDF_Stream* pStream) {
CIDSet cid_set = CIDSET_UNKNOWN;
CPDF_StreamAcc stream;
« no previous file with comments | « core/fpdfapi/fpdf_font/font_int.h ('k') | core/fpdfapi/fpdf_font/fpdf_font_cid.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698