From 9f1b1b78e105d2a5070fdc95b98c291d1efd1e9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 20 Mar 2007 15:49:45 +0000 Subject: [PATCH] added wxUniChar <-> unsigned char conversion git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44976 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/unichar.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/wx/unichar.h b/include/wx/unichar.h index 948018d4a8..e321791b85 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -31,6 +31,7 @@ public: // Create the character from 8bit character value encoded in the current // locale's charset. wxUniChar(char c) { m_value = From8bit(c); } + wxUniChar(unsigned char c) { m_value = From8bit((char)c); } // Create the character from a wchar_t character value. wxUniChar(wchar_t c) { m_value = c; } @@ -49,6 +50,7 @@ public: // Casts to char and wchar_t types: operator char() const { return To8bit(m_value); } + operator unsigned char() const { return (unsigned char)To8bit(m_value); } operator wchar_t() const { return m_value; } #ifndef wxWINT_T_IS_TYPEDEF operator wint_t() const { return m_value; } @@ -178,6 +180,7 @@ public: // Casts to wxUniChar type: operator char() const { return UniChar(); } + operator unsigned char() const { return UniChar(); } operator wchar_t() const { return UniChar(); } #ifndef wxWINT_T_IS_TYPEDEF operator wint_t() const { return UniChar(); }