X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/830f8f11bca5c0892ae767ba14790c8b5b59011f..333e57d578e9e0fb6555452b5a53698ffd85ee69:/include/wx/convauto.h diff --git a/include/wx/convauto.h b/include/wx/convauto.h index ec32b93c43..fcd26532e9 100644 --- a/include/wx/convauto.h +++ b/include/wx/convauto.h @@ -27,19 +27,21 @@ public: // copy ctor doesn't initialize anything neither as conversion can only be // deduced on first use - wxConvAuto(const wxConvAuto& WXUNUSED(other)) { m_conv = NULL; } + wxConvAuto(const wxConvAuto& WXUNUSED(other)) : wxMBConv() { m_conv = NULL; } virtual ~wxConvAuto() { if ( m_conv && m_ownsConv ) delete m_conv; } // override the base class virtual function(s) to use our m_conv virtual size_t ToWChar(wchar_t *dst, size_t dstLen, - const char *src, size_t srcLen = -1) const; + const char *src, size_t srcLen = wxNO_LEN) const; virtual size_t FromWChar(char *dst, size_t dstLen, - const wchar_t *src, size_t srcLen = -1) const; + const wchar_t *src, size_t srcLen = wxNO_LEN) const; virtual size_t GetMBNulLen() const { return m_conv->GetMBNulLen(); } + virtual wxMBConv *Clone() const { return new wxConvAuto(*this); } + private: // all currently recognized BOM values enum BOMType @@ -90,7 +92,7 @@ private: bool m_consumedBOM; - DECLARE_NO_ASSIGN_CLASS(wxConvAuto); + DECLARE_NO_ASSIGN_CLASS(wxConvAuto) }; #endif // wxUSE_WCHAR_T