diff options
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. |