X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ftime%2Fdatetime.cpp;h=e011f3b2ac0b8a3681048bd1c59e17194dbda03c;hp=e1abcf7da81aade456c90ce6f438fd61ea2958c7;hb=HEAD;hpb=f24e7b96e76b63c9b9b8a6bce4c7a9db64276ea8 diff --git a/source/time/datetime.cpp b/source/time/datetime.cpp index e1abcf7..e011f3b 100644 --- a/source/time/datetime.cpp +++ b/source/time/datetime.cpp @@ -29,7 +29,7 @@ inline unsigned char month_days(int y, unsigned char m) } template -inline int cmp_(T a, T b) +inline int _cmp(T a, T b) { if(a=1000000) throw out_of_range("DateTime::DateTime usec"); if(second>=60) @@ -251,19 +231,19 @@ DateTime &DateTime::operator-=(const TimeDelta &td) 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; }