Remove top level "const" from wxMBConv methods return values
This "const" is useless and doesn't actually do anything, remove it to avoid confusion.
This commit is contained in:
parent
6e7254a7a1
commit
b3fe07942f
3 changed files with 24 additions and 24 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
//@}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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 )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue