break;
}
- return !s.IsEmpty() && s.ToULong(number);
+ return !s.empty() && s.ToULong(number);
}
// scans all alphabetic characters and returns the resulting string
mday = (wxDateTime::wxDateTime_t)tm.tm_mday;
mon = (wxDateTime::Month)tm.tm_mon;
year = 1900 + tm.tm_year;
- wday = tm.tm_wday;
- yday = tm.tm_yday;
+ wday = (wxDateTime::wxDateTime_t)tm.tm_wday;
+ yday = (wxDateTime::wxDateTime_t)tm.tm_yday;
}
bool wxDateTime::Tm::IsValid() const
// compute the week day from day/month/year: we use the dumbest algorithm
// possible: just compute our JDN and then use the (simple to derive)
// formula: weekday = (JDN + 1.5) % 7
- wday = (wxDateTime::WeekDay)(GetTruncatedJDN(mday, mon, year) + 2) % 7;
+ wday = (wxDateTime::wxDateTime_t)((wxDateTime::WeekDay)(GetTruncatedJDN(mday, mon, year) + 2) % 7);
}
void wxDateTime::Tm::AddMonths(int monDiff)
fmt += *p;
}
- if ( !fmt.IsEmpty() )
+ if ( !fmt.empty() )
{
// we've only got the flags and width so far in fmt
fmt.Prepend(_T('%'));
wxString am, pm, token = GetAlphaToken(input);
GetAmPmStrings(&am, &pm);
- if (am.IsEmpty() && pm.IsEmpty())
+ if (am.empty() && pm.empty())
return (wxChar *)NULL; // no am/pm strings defined
if ( token.CmpNoCase(pm) == 0 )
{