summaryrefslogtreecommitdiff
path: root/datetime.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2007-04-15 02:55:16 +0000
committerJohn Wiegley <johnw@newartisans.com>2008-04-13 03:35:32 -0400
commita087e6ea97494d97580c97705c665cac317a0dc3 (patch)
treed771c7f88f5b6255cb46b2d69aeec9395b3f982d /datetime.h
parent691c29a696d2347faebd5663da9d1dc751f275eb (diff)
downloadfork-ledger-a087e6ea97494d97580c97705c665cac317a0dc3.tar.gz
fork-ledger-a087e6ea97494d97580c97705c665cac317a0dc3.tar.bz2
fork-ledger-a087e6ea97494d97580c97705c665cac317a0dc3.zip
Cleared out all warnings; started work on getting Python up again.
Diffstat (limited to 'datetime.h')
-rw-r--r--datetime.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/datetime.h b/datetime.h
index a2c4c71b..cd7b3a16 100644
--- a/datetime.h
+++ b/datetime.h
@@ -8,7 +8,7 @@
class date_error : public error {
public:
- date_error(const std::string& reason) throw() : error(reason) {}
+ date_error(const std::string& _reason) throw() : error(_reason) {}
virtual ~date_error() throw() {}
};
@@ -71,12 +71,11 @@ class date_t
virtual date_t& operator+=(const long days) {
// jww (2006-03-26): This is not accurate enough when DST is in effect!
- assert(0);
when += days * 86400;
return *this;
}
virtual date_t& operator-=(const long days) {
- assert(0);
+ // jww (2006-03-26): This is not accurate enough when DST is in effect!
when -= days * 86400;
return *this;
}
@@ -167,7 +166,7 @@ inline std::istream& operator>>(std::istream& in, date_t& moment) {
class datetime_error : public error {
public:
- datetime_error(const std::string& reason) throw() : error(reason) {}
+ datetime_error(const std::string& _reason) throw() : error(_reason) {}
virtual ~datetime_error() throw() {}
};
@@ -176,7 +175,7 @@ class datetime_t : public date_t
public:
static datetime_t now;
- datetime_t() : date_t() {}
+ datetime_t() : date_t(now.when) {}
datetime_t(const datetime_t& _when) : date_t(_when.when) {}
datetime_t(const date_t& _when) : date_t(_when) {}