diff options
author | Murray Cumming <murrayc@usa.net> | 2004-01-22 18:38:14 +0000 |
---|---|---|
committer | Murray Cumming <murrayc@src.gnome.org> | 2004-01-22 18:38:14 +0000 |
commit | 62eb5f74af0eb32748cda0ec82c008c00c38c236 (patch) | |
tree | 68756b851a75349743f497e9821699645e7242c9 /glib/src/date.ccg | |
parent | a4d64e4d436b8d21f64d9bf424af558c61010c71 (diff) | |
download | glibmm-62eb5f74af0eb32748cda0ec82c008c00c38c236.tar.gz |
Added clamp_min() and clamp_max() to wrap the case where g_date_clamp()
2004-01-22 Murray Cumming <murrayc@usa.net>
* glib/date.[hg|ccg]: Added clamp_min() and clamp_max() to wrap the
case where g_date_clamp() takes null values.
Diffstat (limited to 'glib/src/date.ccg')
-rw-r--r-- | glib/src/date.ccg | 12 |
1 files changed, 12 insertions, 0 deletions
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_); |