diff --git a/include/wx/strconv.h b/include/wx/strconv.h index a916349f60..8f5569356d 100644 --- a/include/wx/strconv.h +++ b/include/wx/strconv.h @@ -74,11 +74,11 @@ public: // Convenience functions for translating NUL-terminated strings: return // the buffer containing the converted string or empty buffer if the // conversion failed. - const wxWCharBuffer cMB2WC(const char *in) const; - const wxCharBuffer cWC2MB(const wchar_t *in) const; + wxWCharBuffer cMB2WC(const char *in) const; + wxCharBuffer cWC2MB(const wchar_t *in) const; - const wxWCharBuffer cMB2WC(const wxScopedCharBuffer& in) const; - const wxCharBuffer cWC2MB(const wxScopedWCharBuffer& in) const; + wxWCharBuffer cMB2WC(const wxScopedCharBuffer& in) const; + wxCharBuffer cWC2MB(const wxScopedWCharBuffer& in) const; // Convenience functions for converting strings which may contain embedded @@ -96,22 +96,22 @@ public: // number of characters converted, whether the last one of them was NUL or // not. But if inLen == wxNO_LEN then outLen doesn't account for the last // NUL even though it is present. - const wxWCharBuffer + wxWCharBuffer cMB2WC(const char *in, size_t inLen, size_t *outLen) const; - const wxCharBuffer + wxCharBuffer cWC2MB(const wchar_t *in, size_t inLen, size_t *outLen) const; // convenience functions for converting MB or WC to/from wxWin default #if wxUSE_UNICODE - const wxWCharBuffer cMB2WX(const char *psz) const { return cMB2WC(psz); } - const wxCharBuffer cWX2MB(const wchar_t *psz) const { return cWC2MB(psz); } + wxWCharBuffer cMB2WX(const char *psz) const { return cMB2WC(psz); } + wxCharBuffer cWX2MB(const wchar_t *psz) const { return cWC2MB(psz); } const wchar_t* cWC2WX(const wchar_t *psz) const { return psz; } const wchar_t* cWX2WC(const wchar_t *psz) const { return psz; } #else // ANSI const char* cMB2WX(const char *psz) const { return psz; } const char* cWX2MB(const char *psz) const { return psz; } - const wxCharBuffer cWC2WX(const wchar_t *psz) const { return cWC2MB(psz); } - const wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); } + wxCharBuffer cWC2WX(const wchar_t *psz) const { return cWC2MB(psz); } + wxWCharBuffer cWX2WC(const char *psz) const { return cMB2WC(psz); } #endif // Unicode/ANSI // this function is used in the implementation of cMB2WC() to distinguish diff --git a/interface/wx/strconv.h b/interface/wx/strconv.h index 7bd65e2587..111a07ce54 100644 --- a/interface/wx/strconv.h +++ b/interface/wx/strconv.h @@ -190,7 +190,7 @@ public: invalid and @a outLen is set to 0 (and not @c wxCONV_FAILED for compatibility concerns). */ - const wxWCharBuffer cMB2WC(const char* in, + wxWCharBuffer cMB2WC(const char* in, size_t inLen, size_t *outLen) const; @@ -209,7 +209,7 @@ public: @since 2.9.1 */ - const wxWCharBuffer cMB2WC(const wxCharBuffer& buf) const; + wxWCharBuffer cMB2WC(const wxCharBuffer& buf) const; //@{ /** @@ -221,7 +221,7 @@ public: is defined as the correct return type (without const). */ const char* cMB2WX(const char* psz) const; - const wxWCharBuffer cMB2WX(const char* psz) const; + wxWCharBuffer cMB2WX(const char* psz) const; //@} /** @@ -234,7 +234,7 @@ public: Its parameters have the same meaning as the corresponding parameters of FromWChar(), please see the description of cMB2WC() for more details. */ - const wxCharBuffer cWC2MB(const wchar_t* in, + wxCharBuffer cWC2MB(const wchar_t* in, size_t inLen, size_t *outLen) const; @@ -253,7 +253,7 @@ public: @since 2.9.1 */ - const wxCharBuffer cWC2MB(const wxWCharBuffer& buf) const; + wxCharBuffer cWC2MB(const wxWCharBuffer& buf) const; //@{ /** @@ -264,7 +264,7 @@ public: defined as the correct return type (without const). */ const wchar_t* cWC2WX(const wchar_t* psz) const; - const wxCharBuffer cWC2WX(const wchar_t* psz) const; + wxCharBuffer cWC2WX(const wchar_t* psz) const; //@} //@{ @@ -276,7 +276,7 @@ public: is defined as the correct return type (without const). */ const char* cWX2MB(const wxChar* psz) const; - const wxCharBuffer cWX2MB(const wxChar* psz) const; + wxCharBuffer cWX2MB(const wxChar* psz) const; //@} //@{ @@ -288,7 +288,7 @@ public: defined as the correct return type (without const). */ const wchar_t* cWX2WC(const wxChar* psz) const; - const wxWCharBuffer cWX2WC(const wxChar* psz) const; + wxWCharBuffer cWX2WC(const wxChar* psz) const; //@} /** diff --git a/src/common/strconv.cpp b/src/common/strconv.cpp index 17fb7233c4..e22f22bbea 100644 --- a/src/common/strconv.cpp +++ b/src/common/strconv.cpp @@ -399,7 +399,7 @@ wxMBConv::~wxMBConv() // nothing to do here (necessary for Darwin linking probably) } -const wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const +wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const { if ( psz ) { @@ -419,7 +419,7 @@ const wxWCharBuffer wxMBConv::cMB2WC(const char *psz) const return wxWCharBuffer(); } -const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *pwz) const +wxCharBuffer wxMBConv::cWC2MB(const wchar_t *pwz) const { if ( pwz ) { @@ -435,7 +435,7 @@ const wxCharBuffer wxMBConv::cWC2MB(const wchar_t *pwz) const return wxCharBuffer(); } -const wxWCharBuffer +wxWCharBuffer wxMBConv::cMB2WC(const char *inBuff, size_t inLen, size_t *outLen) const { const size_t dstLen = ToWChar(NULL, 0, inBuff, inLen); @@ -470,7 +470,7 @@ wxMBConv::cMB2WC(const char *inBuff, size_t inLen, size_t *outLen) const return wxWCharBuffer(); } -const wxCharBuffer +wxCharBuffer wxMBConv::cWC2MB(const wchar_t *inBuff, size_t inLen, size_t *outLen) const { size_t dstLen = FromWChar(NULL, 0, inBuff, inLen); @@ -511,7 +511,7 @@ wxMBConv::cWC2MB(const wchar_t *inBuff, size_t inLen, size_t *outLen) const return wxCharBuffer(); } -const wxWCharBuffer wxMBConv::cMB2WC(const wxScopedCharBuffer& buf) const +wxWCharBuffer wxMBConv::cMB2WC(const wxScopedCharBuffer& buf) const { const size_t srcLen = buf.length(); if ( srcLen ) @@ -529,7 +529,7 @@ const wxWCharBuffer wxMBConv::cMB2WC(const wxScopedCharBuffer& buf) const return wxScopedWCharBuffer::CreateNonOwned(L"", 0); } -const wxCharBuffer wxMBConv::cWC2MB(const wxScopedWCharBuffer& wbuf) const +wxCharBuffer wxMBConv::cWC2MB(const wxScopedWCharBuffer& wbuf) const { const size_t srcLen = wbuf.length(); if ( srcLen )