From 62eb5f74af0eb32748cda0ec82c008c00c38c236 Mon Sep 17 00:00:00 2001 From: Murray Cumming Date: Thu, 22 Jan 2004 18:38:14 +0000 Subject: Added clamp_min() and clamp_max() to wrap the case where g_date_clamp() 2004-01-22 Murray Cumming * glib/date.[hg|ccg]: Added clamp_min() and clamp_max() to wrap the case where g_date_clamp() takes null values. --- glib/src/date.ccg | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'glib/src/date.ccg') diff --git a/glib/src/date.ccg b/glib/src/date.ccg index d4378ee6..0bf5c632 100644 --- a/glib/src/date.ccg +++ b/glib/src/date.ccg @@ -165,6 +165,18 @@ Date& Date::clamp(const Date& min_date, const Date& max_date) return *this; } +Date& Date::clamp_min(const Date& min_date) +{ + g_date_clamp(&gobject_, &min_date.gobject_, 0 /* see the C docs */); + return *this; +} + +Date& Date::clamp_max(const Date& max_date) +{ + g_date_clamp(&gobject_, 0 /* see the C docs */, &max_date.gobject_); + return *this; +} + void Date::order(Date& other) { g_date_order(&gobject_, &other.gobject_); -- cgit v1.2.1