X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a54cf37118275c43cf03beb9a8960bba0d8a957c..1f0acb435592470b421b80df854fbbb08cd2853f:/include/wx/valnum.h?ds=sidebyside diff --git a/include/wx/valnum.h b/include/wx/valnum.h index 428fe7ff8a..2fbfe607b8 100644 --- a/include/wx/valnum.h +++ b/include/wx/valnum.h @@ -49,7 +49,7 @@ protected: m_style = style; } - wxNumValidatorBase(const wxNumValidatorBase& other) + wxNumValidatorBase(const wxNumValidatorBase& other) : wxValidator() { m_style = other.m_style; } @@ -135,11 +135,17 @@ public: 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) { @@ -186,7 +192,7 @@ public: else if ( !BaseValidator::FromString(s, &value) ) return false; - if ( !IsInRange(value) ) + if ( !this->IsInRange(value) ) return false; *m_value = static_cast(value); @@ -219,7 +225,7 @@ private: { wxString s; if ( value != 0 || !BaseValidator::HasFlag(wxNUM_VAL_ZERO_AS_BLANK) ) - s = ToString(value); + s = this->ToString(value); return s; } @@ -308,8 +314,8 @@ public: wxIntegerValidator(ValueType *value = NULL, int style = wxNUM_VAL_DEFAULT) : Base(value, style) { - DoSetMin(std::numeric_limits::min()); - DoSetMax(std::numeric_limits::max()); + this->DoSetMin(std::numeric_limits::min()); + this->DoSetMax(std::numeric_limits::max()); } virtual wxObject *Clone() const { return new wxIntegerValidator(*this); } @@ -403,7 +409,7 @@ public: { DoSetMinMax(); - SetPrecision(std::numeric_limits::digits10); + this->SetPrecision(std::numeric_limits::digits10); } // Ctor specifying an explicit precision. @@ -428,8 +434,8 @@ private: // 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::max()); - DoSetMax( std::numeric_limits::max()); + this->DoSetMin(-std::numeric_limits::max()); + this->DoSetMax( std::numeric_limits::max()); } };