Disable check in wxLongLong::ToLong() for LP64 platforms

The check is redundant there as conversion can never fail and just results in
warnings from static code analyzers.
This commit is contained in:
Vadim Zeitlin 2015-09-23 00:24:29 +02:00
parent 8282c1be0f
commit dfb60af47f

View File

@ -175,8 +175,12 @@ public:
// convert to long with range checking in debug mode (only!)
long ToLong() const
{
// This assert is useless if long long is the same as long (which is
// the case under the standard Unix LP64 model).
#ifdef wxHAS_LONG_LONG_T_DIFFERENT_FROM_LONG
wxASSERT_MSG( (m_ll >= LONG_MIN) && (m_ll <= LONG_MAX),
wxT("wxLongLong to long conversion loss of precision") );
#endif
return wx_truncate_cast(long, m_ll);
}