// 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
bool m_consumedBOM;
- DECLARE_NO_ASSIGN_CLASS(wxConvAuto);
+ DECLARE_NO_ASSIGN_CLASS(wxConvAuto)
};
#endif // wxUSE_WCHAR_T