m_style = style;
}
- wxNumValidatorBase(const wxNumValidatorBase& other)
+ wxNumValidatorBase(const wxNumValidatorBase& other) : wxValidator()
{
m_style = other.m_style;
}
typedef typename BaseValidator::LongestValueType LongestValueType;
+ // FIXME-VC6: This compiler fails to compile the assert below with a
+ // nonsensical error C2248: "'LongestValueType' : cannot access protected
+ // typedef declared in class 'wxIntegerValidatorBase'" so just disable the
+ // check for it.
+#ifndef __VISUALC6__
wxCOMPILE_TIME_ASSERT
(
sizeof(ValueType) <= sizeof(LongestValueType),
UnsupportedType
);
+#endif // __VISUALC6__
void SetMin(ValueType min)
{
else if ( !BaseValidator::FromString(s, &value) )
return false;
- if ( !IsInRange(value) )
+ if ( !this->IsInRange(value) )
return false;
*m_value = static_cast<ValueType>(value);
{
wxString s;
if ( value != 0 || !BaseValidator::HasFlag(wxNUM_VAL_ZERO_AS_BLANK) )
- s = ToString(value);
+ s = this->ToString(value);
return s;
}
wxIntegerValidator(ValueType *value = NULL, int style = wxNUM_VAL_DEFAULT)
: Base(value, style)
{
- DoSetMin(std::numeric_limits<ValueType>::min());
- DoSetMax(std::numeric_limits<ValueType>::max());
+ this->DoSetMin(std::numeric_limits<ValueType>::min());
+ this->DoSetMax(std::numeric_limits<ValueType>::max());
}
virtual wxObject *Clone() const { return new wxIntegerValidator(*this); }
{
DoSetMinMax();
- SetPrecision(std::numeric_limits<ValueType>::digits10);
+ this->SetPrecision(std::numeric_limits<ValueType>::digits10);
}
// Ctor specifying an explicit precision.
// NB: Do not use min(), it's not the smallest representable value for
// the floating point types but rather the smallest representable
// positive value.
- DoSetMin(-std::numeric_limits<ValueType>::max());
- DoSetMax( std::numeric_limits<ValueType>::max());
+ this->DoSetMin(-std::numeric_limits<ValueType>::max());
+ this->DoSetMax( std::numeric_limits<ValueType>::max());
}
};