Add wxIntegerValidatorBase::ULongestValueType typedef
Allow just writing ULongestValueType instead of writing #ifdefs in several places.
This commit is contained in:
@@ -293,8 +293,10 @@ protected:
|
|||||||
// on it.
|
// on it.
|
||||||
#ifdef wxLongLong_t
|
#ifdef wxLongLong_t
|
||||||
typedef wxLongLong_t LongestValueType;
|
typedef wxLongLong_t LongestValueType;
|
||||||
|
typedef wxULongLong_t ULongestValueType;
|
||||||
#else
|
#else
|
||||||
typedef long LongestValueType;
|
typedef long LongestValueType;
|
||||||
|
typedef unsigned long ULongestValueType;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxIntegerValidatorBase(int style)
|
wxIntegerValidatorBase(int style)
|
||||||
|
@@ -244,11 +244,7 @@ wxIntegerValidatorBase::FromString(const wxString& s,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Parse as unsigned to ensure we don't accept minus sign here.
|
// Parse as unsigned to ensure we don't accept minus sign here.
|
||||||
#ifdef wxULongLong_t
|
ULongestValueType uvalue;
|
||||||
wxULongLong_t uvalue;
|
|
||||||
#else
|
|
||||||
unsigned long uvalue;
|
|
||||||
#endif
|
|
||||||
if ( !wxNumberFormatter::FromString(s, &uvalue) )
|
if ( !wxNumberFormatter::FromString(s, &uvalue) )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user