int firstNonZeroPos = 0;
- for ( ; i != iMax; i++ )
+ for ( ; i != iMax; ++i )
{
wxChar c = *i;
if ( c != wxS('0') && c != wxS(' ') )
wxString::const_iterator i = target.end() - 1;
size_t new_len = target.length() - 1;
- for ( ; i != target.begin(); i-- )
+ for ( ; i != target.begin(); --i )
{
if ( *i != wxS('0') )
break;
}
int wxEnumProperty::ms_nextIndex = -2;
+int wxEnumProperty::ms_prevIndex = -1;
void wxEnumProperty::OnSetValue()
{
else if ( variantType == wxPG_VARIANT_TYPE_STRING )
ValueFromString_( m_value, m_value.GetString(), 0 );
else
- wxASSERT( false );
+ wxFAIL;
if ( ms_nextIndex != -2 )
{
return false;
}
+void
+wxEnumProperty::OnValidationFailure( wxVariant& WXUNUSED(pendingValue) )
+{
+ // Revert index
+ m_index = ms_prevIndex;
+ ResetNextIndex();
+}
+
void wxEnumProperty::SetIndex( int index )
{
+ ms_prevIndex = m_index;
ms_nextIndex = -2;
m_index = index;
}
unsigned int i;
unsigned int itemCount = src.size();
- wxChar preas[2];
+ wxChar preas[2] = { 0, 0 };
dst.Empty();
- if ( !preDelim )
- preas[0] = 0;
- else if ( (flags & 1) )
+ if ( flags & 1 )
{
preas[0] = preDelim;
- preas[1] = 0;
pdr = wxS("\\");
pdr += preDelim;
}