Add conversions to/from long long to wxUniChar.

Allow conversions to/from long long and unsigned long long values in wxUniChar
for consistency with the other integral types.

Also make the code shorter by using helper wxDO_FOR_INT_TYPES() and
wxDO_FOR_CHAR_INT_TYPES() macros to avoid duplicating the same code for all of
the integral types and having to handle wchar_t (and wxLongLong_t now)
specially because sometimes we may need to overload on it and sometimes not.

Finally, add more tests to check that all the wxUniChar methods compile and
work with all the different types.

Closes #15206.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74029 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-05-19 12:38:12 +00:00
parent 15df2e476b
commit 622bc15f11
4 changed files with 977 additions and 67 deletions

View File

@@ -45,6 +45,8 @@ public:
wxUniChar(unsigned long int c);
wxUniChar(short int c);
wxUniChar(unsigned short int c);
wxUniChar(wxLongLong_t c);
wxUniChar(wxULongLong_t c);
wxUniChar(const wxUniCharRef& c);
@@ -97,6 +99,8 @@ public:
operator unsigned long int() const;
operator short int() const;
operator unsigned short int() const;
operator wxLongLong_t() const;
operator wxULongLong_t() const;
//@}
//@{
@@ -114,6 +118,8 @@ public:
wxUniChar& operator=(unsigned long int c);
wxUniChar& operator=(short int c);
wxUniChar& operator=(unsigned short int c);
wxUniChar& operator=(wxLongLong_t c);
wxUniChar& operator=(wxULongLong_t c);
//@}
};