summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2008-04-09 23:17:21 -0400
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 06:04:24 -0400
commit671ccd16d4e893b2dd83f238d4f37ee1b545b43c (patch)
tree1462224463dbc700c012cdf52af3403147713d44
parent925597a0ff2d899bece416ae144255b9bd06d2d2 (diff)
downloadfork-ledger-671ccd16d4e893b2dd83f238d4f37ee1b545b43c.tar.gz
fork-ledger-671ccd16d4e893b2dd83f238d4f37ee1b545b43c.tar.bz2
fork-ledger-671ccd16d4e893b2dd83f238d4f37ee1b545b43c.zip
Added a class operator hack to allow building on FreeBSD 8.
-rw-r--r--datetime.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/datetime.h b/datetime.h
index 9f85d3f2..8ca5f424 100644
--- a/datetime.h
+++ b/datetime.h
@@ -96,7 +96,7 @@ class date_t
operator bool() const {
return when != 0;
}
- operator std::time_t() {
+ operator std::time_t() const {
return when;
}
operator std::string() const {
@@ -138,7 +138,7 @@ class date_t
inline long operator-(const date_t& left, const date_t& right) {
date_t temp(left);
temp -= right;
- return (long)temp;
+ return long(temp);
}
inline date_t operator+(const date_t& left, const long days) {