diff options
author | weili <weili@chromium.org> | 2016-06-13 14:57:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-13 14:57:29 -0700 |
commit | 868150bd69f0f1f9472affc20deea0a9341bf22b (patch) | |
tree | 07ebd9327583ecc20ebb43b800c2f36501a80068 /core/fpdfapi/fpdf_font/fpdf_font.cpp | |
parent | 82e24b1c5047076b982c073671315071760b9880 (diff) | |
download | pdfium-868150bd69f0f1f9472affc20deea0a9341bf22b.tar.xz |
Make code compile with clang_use_chrome_plugin (part I)
This change contains files in core/fpdfapi directory. This is part
of the efforts to make PDFium code compilable by Clang chromium
style plugins.
The changes are mainly the following:
-- move inline constructor/destructor of complex class/struct out-of-line;
-- add constructor/destructor of complex class/struct if not
explicitly defined;
-- add explicit out-of-line copy constructor when needed;
-- move inline virtual functions out-of-line;
-- Properly mark virtual functions with 'override';
-- some minor cleanups;
BUG=pdfium:469
Review-Url: https://codereview.chromium.org/2060973002
Diffstat (limited to 'core/fpdfapi/fpdf_font/fpdf_font.cpp')
-rw-r--r-- | core/fpdfapi/fpdf_font/fpdf_font.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/core/fpdfapi/fpdf_font/fpdf_font.cpp b/core/fpdfapi/fpdf_font/fpdf_font.cpp index e5442215c4..1735f0ba25 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; |