pull code out of header
This commit is contained in:
@@ -41,31 +41,8 @@ struct DateTime
|
||||
DateTime();
|
||||
void Init();
|
||||
|
||||
bool operator<( const DateTime& other ) const
|
||||
{
|
||||
#define COMPARE( v ) if(v<other.v) return true; if(v>other.v) return false;
|
||||
COMPARE( tm_year );
|
||||
COMPARE( tm_mon );
|
||||
COMPARE( tm_mday );
|
||||
COMPARE( tm_hour );
|
||||
COMPARE( tm_min );
|
||||
COMPARE( tm_sec );
|
||||
#undef COMPARE
|
||||
// they're equal
|
||||
return false;
|
||||
}
|
||||
bool operator==( const DateTime& other ) const
|
||||
{
|
||||
#define COMPARE(x) if( x!=other.x ) return false;
|
||||
COMPARE( tm_year );
|
||||
COMPARE( tm_mon );
|
||||
COMPARE( tm_mday );
|
||||
COMPARE( tm_hour );
|
||||
COMPARE( tm_min );
|
||||
COMPARE( tm_sec );
|
||||
#undef COMPARE
|
||||
return true;
|
||||
}
|
||||
bool operator<( const DateTime& other ) const;
|
||||
bool operator==( const DateTime& other ) const;
|
||||
bool operator!=( const DateTime& other ) const { return !operator==(other); }
|
||||
|
||||
static DateTime GetNowDateTime();
|
||||
|
||||
Reference in New Issue
Block a user