From d4e59879957aa50fa55de8d3910f63e997b9ec8e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Sun, 1 Jul 2007 12:32:10 +0000 Subject: [PATCH] explicitly cast m_value to the resulting type in wxUniChar's integer conversion operators to silence compiler warnings git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47053 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/unichar.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/include/wx/unichar.h b/include/wx/unichar.h index 8c61a2c898..e3bfb4c587 100644 --- a/include/wx/unichar.h +++ b/include/wx/unichar.h @@ -92,14 +92,14 @@ public: operator char() const { return To8bit(m_value); } operator unsigned char() const { return (unsigned char)To8bit(m_value); } #if wxWCHAR_T_IS_SEPARATE_TYPE - operator wchar_t() const { return m_value; } + operator wchar_t() const { return (wchar_t)m_value; } #endif - operator int() const { return m_value; } - operator unsigned int() const { return m_value; } - operator long int() const { return m_value; } - operator unsigned long int() const { return m_value; } - operator short int() const { return m_value; } - operator unsigned short int() const { return m_value; } + operator int() const { return (int)m_value; } + operator unsigned int() const { return (unsigned int)m_value; } + operator long int() const { return (long int)m_value; } + operator unsigned long int() const { return (unsigned long)m_value; } + operator short int() const { return (short int)m_value; } + operator unsigned short int() const { return (unsigned short int)m_value; } // We need this operator for the "*p" part of expressions like "for ( // const_iterator p = begin() + nStart; *p; ++p )". In this case,