mirror of
https://github.com/pocoproject/poco.git
synced 2025-01-31 06:35:03 +01:00
GH #346: Make Poco::Data::Date and Poco::Data::Time compare functions const.
This commit is contained in:
parent
6ec4986fb1
commit
794ee36b3d
@ -58,6 +58,7 @@ Release 1.5.3 (2014-05-xx)
|
||||
- fixed GH #362: Defect in Var::parseString when there is no space between value and newline
|
||||
- fixed GH #314: JSON parsing bug
|
||||
- added GH #313: MetaColumn additions for Data::ODBC and Data::SQLite
|
||||
- fixed GH #346: Make Poco::Data::Date and Poco::Data::Time compare functions const.
|
||||
|
||||
Release 1.5.2 (2013-09-16)
|
||||
==========================
|
||||
|
@ -99,16 +99,16 @@ public:
|
||||
Date& operator = (const Poco::Dynamic::Var& var);
|
||||
/// Assignment operator for Var.
|
||||
|
||||
bool operator == (const Date& date);
|
||||
bool operator == (const Date& date) const;
|
||||
/// Equality operator.
|
||||
|
||||
bool operator != (const Date& date);
|
||||
bool operator != (const Date& date) const;
|
||||
/// Inequality operator.
|
||||
|
||||
bool operator < (const Date& date);
|
||||
bool operator < (const Date& date) const;
|
||||
/// Less then operator.
|
||||
|
||||
bool operator > (const Date& date);
|
||||
bool operator > (const Date& date) const;
|
||||
/// Greater then operator.
|
||||
|
||||
private:
|
||||
@ -153,7 +153,7 @@ inline Date& Date::operator = (const DateTime& dt)
|
||||
}
|
||||
|
||||
|
||||
inline bool Date::operator == (const Date& date)
|
||||
inline bool Date::operator == (const Date& date) const
|
||||
{
|
||||
return _year == date.year() &&
|
||||
_month == date.month() &&
|
||||
@ -161,13 +161,13 @@ inline bool Date::operator == (const Date& date)
|
||||
}
|
||||
|
||||
|
||||
inline bool Date::operator != (const Date& date)
|
||||
inline bool Date::operator != (const Date& date) const
|
||||
{
|
||||
return !(*this == date);
|
||||
}
|
||||
|
||||
|
||||
inline bool Date::operator > (const Date& date)
|
||||
inline bool Date::operator > (const Date& date) const
|
||||
{
|
||||
return !(*this == date) && !(*this < date);
|
||||
}
|
||||
|
@ -99,16 +99,16 @@ public:
|
||||
Time& operator = (const Poco::Dynamic::Var& var);
|
||||
/// Assignment operator for Var.
|
||||
|
||||
bool operator == (const Time& time);
|
||||
bool operator == (const Time& time) const;
|
||||
/// Equality operator.
|
||||
|
||||
bool operator != (const Time& time);
|
||||
bool operator != (const Time& time) const;
|
||||
/// Inequality operator.
|
||||
|
||||
bool operator < (const Time& time);
|
||||
bool operator < (const Time& time) const;
|
||||
/// Less then operator.
|
||||
|
||||
bool operator > (const Time& time);
|
||||
bool operator > (const Time& time) const;
|
||||
/// Greater then operator.
|
||||
|
||||
private:
|
||||
@ -153,7 +153,7 @@ inline Time& Time::operator = (const DateTime& dt)
|
||||
}
|
||||
|
||||
|
||||
inline bool Time::operator == (const Time& time)
|
||||
inline bool Time::operator == (const Time& time) const
|
||||
{
|
||||
return _hour == time.hour() &&
|
||||
_minute == time.minute() &&
|
||||
@ -161,13 +161,13 @@ inline bool Time::operator == (const Time& time)
|
||||
}
|
||||
|
||||
|
||||
inline bool Time::operator != (const Time& time)
|
||||
inline bool Time::operator != (const Time& time) const
|
||||
{
|
||||
return !(*this == time);
|
||||
}
|
||||
|
||||
|
||||
inline bool Time::operator > (const Time& time)
|
||||
inline bool Time::operator > (const Time& time) const
|
||||
{
|
||||
return !(*this == time) && !(*this < time);
|
||||
}
|
||||
|
@ -92,7 +92,7 @@ void Date::assign(int year, int month, int day)
|
||||
}
|
||||
|
||||
|
||||
bool Date::operator < (const Date& date)
|
||||
bool Date::operator < (const Date& date) const
|
||||
{
|
||||
int year = date.year();
|
||||
|
||||
|
@ -89,7 +89,7 @@ void Time::assign(int hour, int minute, int second)
|
||||
}
|
||||
|
||||
|
||||
bool Time::operator < (const Time& time)
|
||||
bool Time::operator < (const Time& time) const
|
||||
{
|
||||
int hour = time.hour();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user