We can convert values up to ULONG_MAX to unsigned long losslessly, not up to
LONG_MAX.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67641
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
// convert to ulong with range checking in debug mode (only!)
unsigned long ToULong() const
{
// convert to ulong with range checking in debug mode (only!)
unsigned long ToULong() const
{
- wxASSERT_MSG( m_ll <= LONG_MAX,
+ wxASSERT_MSG( m_ll <= ULONG_MAX,
wxT("wxULongLong to long conversion loss of precision") );
return wx_truncate_cast(unsigned long, m_ll);
wxT("wxULongLong to long conversion loss of precision") );
return wx_truncate_cast(unsigned long, m_ll);