diff options
author | Lei Zhang <thestig@chromium.org> | 2016-02-19 14:26:46 -0800 |
---|---|---|
committer | Lei Zhang <thestig@chromium.org> | 2016-02-19 14:26:46 -0800 |
commit | 11d33361e95d5ea61ee43e4261fa8f53aa372731 (patch) | |
tree | df81483804ef757d6f3c6f91531e7deae1eebf42 /core/include/fxcrt | |
parent | 84e5a12f186a00bf37a26cc13965f65c25561bd1 (diff) | |
download | pdfium-11d33361e95d5ea61ee43e4261fa8f53aa372731.tar.xz |
Get rid of CFX_CharMap instantiations.
The only thing left are a couple of static methods.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1711273002 .
Diffstat (limited to 'core/include/fxcrt')
-rw-r--r-- | core/include/fxcrt/fx_basic.h | 16 | ||||
-rw-r--r-- | core/include/fxcrt/fx_string.h | 1 |
2 files changed, 8 insertions, 9 deletions
diff --git a/core/include/fxcrt/fx_basic.h b/core/include/fxcrt/fx_basic.h index 4402856996..3e30b1d1a1 100644 --- a/core/include/fxcrt/fx_basic.h +++ b/core/include/fxcrt/fx_basic.h @@ -221,17 +221,17 @@ class CFX_FileBufferArchive : public IFX_BufferArchive { FX_BOOL m_bTakeover; }; -struct CFX_CharMap { - static CFX_CharMap* GetDefaultMapper(int32_t codepage = 0); - - CFX_WideString (*m_GetWideString)(CFX_CharMap* pMap, - const CFX_ByteString& bstr); +class CFX_CharMap { + public: + static CFX_ByteString GetByteString(FX_WORD codepage, + const CFX_WideString& wstr); - CFX_ByteString (*m_GetByteString)(CFX_CharMap* pMap, - const CFX_WideString& wstr); + static CFX_WideString GetWideString(FX_WORD codepage, + const CFX_ByteString& bstr); - int32_t (*m_GetCodePage)(); + CFX_CharMap() = delete; }; + class CFX_UTF8Decoder { public: CFX_UTF8Decoder() { m_PendingBytes = 0; } diff --git a/core/include/fxcrt/fx_string.h b/core/include/fxcrt/fx_string.h index c625bfa925..ca29e1321a 100644 --- a/core/include/fxcrt/fx_string.h +++ b/core/include/fxcrt/fx_string.h @@ -16,7 +16,6 @@ class CFX_BinaryBuf; class CFX_ByteString; class CFX_WideString; -struct CFX_CharMap; // An immutable string with caller-provided storage which must outlive the // string itself. |