Refactor comparison operators for DateTime and Time classes
Change-Id: Ia59373da6717c8705c96eecb0f1dc0016cd2dcd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181068 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
This commit is contained in:
committed by
Mike Kaganski
parent
ddc09464d3
commit
f4bd60261e
@@ -71,9 +71,8 @@ public:
|
||||
|
||||
auto operator <=>( const DateTime& rDateTime ) const
|
||||
{
|
||||
if (auto cmp = Date::operator<=>(rDateTime); cmp != 0)
|
||||
return cmp;
|
||||
return tools::Time::operator<=>(rDateTime);
|
||||
return std::make_pair(GetDate(), GetTime()) <=>
|
||||
std::make_pair(rDateTime.GetDate(), rDateTime.GetTime());
|
||||
}
|
||||
bool operator==(const DateTime& rDateTime) const
|
||||
{
|
||||
|
||||
@@ -133,8 +133,6 @@ public:
|
||||
|
||||
bool IsEqualIgnoreNanoSec( const tools::Time& rTime ) const;
|
||||
|
||||
bool operator==(const Time& rTime) const = default;
|
||||
|
||||
auto operator <=> ( const Time& rTime ) const = default;
|
||||
|
||||
static Time GetUTCOffset();
|
||||
|
||||
Reference in New Issue
Block a user