radically simplified declarations of wxUString-specific char buffers: there are no compatibility concerns, so they can simply be typedefs for wxCharTypeBuffer<T>
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55049 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// Name: wx/ustring.h
|
||||
// Purpose: 32-bit string (UCS-4)
|
||||
// Author: Robert Roebling
|
||||
@@ -15,50 +15,19 @@
|
||||
|
||||
#include <string>
|
||||
|
||||
WXDLLIMPEXP_TEMPLATE_INSTANCE_BASE( wxCharTypeBuffer<wxChar32> )
|
||||
|
||||
#if SIZEOF_WCHAR_T == 2
|
||||
|
||||
typedef wxWCharBuffer wxU16CharBuffer;
|
||||
|
||||
#else
|
||||
|
||||
class WXDLLIMPEXP_BASE wxU16CharBuffer : public wxCharTypeBuffer<wxChar16>
|
||||
{
|
||||
public:
|
||||
typedef wxCharTypeBuffer<wxChar16> wxCharTypeBufferBase;
|
||||
|
||||
wxU16CharBuffer(const wxCharTypeBufferBase& buf)
|
||||
: wxCharTypeBufferBase(buf) {}
|
||||
|
||||
wxU16CharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
|
||||
wxU16CharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
|
||||
};
|
||||
|
||||
typedef wxCharTypeBuffer<wxChar16> wxU16CharBuffer;
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#if SIZEOF_WCHAR_T == 2
|
||||
|
||||
class WXDLLIMPEXP_BASE wxU32CharBuffer : public wxCharTypeBuffer<wxChar32>
|
||||
{
|
||||
public:
|
||||
typedef wxCharTypeBuffer<wxChar32> wxCharTypeBufferBase;
|
||||
|
||||
wxU32CharBuffer(const wxCharTypeBufferBase& buf)
|
||||
: wxCharTypeBufferBase(buf) {}
|
||||
|
||||
wxU32CharBuffer(const CharType *str = NULL) : wxCharTypeBufferBase(str) {}
|
||||
wxU32CharBuffer(size_t len) : wxCharTypeBufferBase(len) {}
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
#if SIZEOF_WCHAR_T == 4
|
||||
typedef wxWCharBuffer wxU32CharBuffer;
|
||||
|
||||
#else
|
||||
typedef wxCharTypeBuffer<wxChar32> wxU32CharBuffer;
|
||||
#endif
|
||||
|
||||
|
||||
class WXDLLIMPEXP_BASE wxUString: public std::basic_string<wxChar32>
|
||||
{
|
||||
public:
|
||||
|
Reference in New Issue
Block a user