}
template<typename T>
-inline int cmp_(T a, T b)
+inline int _cmp(T a, T b)
{
if(a<b)
return -1;
int DateTime::cmp(const DateTime &dt) const
{
- if(int c = cmp_(year, dt.year))
+ if(int c = _cmp(year, dt.year))
return c;
- if(int c = cmp_(month, dt.month))
+ if(int c = _cmp(month, dt.month))
return c;
- if(int c = cmp_(mday, dt.mday))
+ if(int c = _cmp(mday, dt.mday))
return c;
- if(int c = cmp_(hour, dt.hour))
+ if(int c = _cmp(hour, dt.hour))
return c;
- if(int c = cmp_(minute, dt.minute))
+ if(int c = _cmp(minute, dt.minute))
return c;
- if(int c = cmp_(second, dt.second))
+ if(int c = _cmp(second, dt.second))
return c;
- if(int c = cmp_(usec, dt.usec))
+ if(int c = _cmp(usec, dt.usec))
return c;
return 0;
}