summaryrefslogtreecommitdiff
path: root/src/item.h
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-04 19:55:27 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-04 19:55:27 -0400
commit2d941730b1c60342be5b108d2d654723b3b7c2cb (patch)
tree6a3f4b7305857e85d2684670492007bafc3668d0 /src/item.h
parent73cf3b01fbd50c3a8a4fd96ff69643c28394d8fe (diff)
downloadfork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.gz
fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.tar.bz2
fork-ledger-2d941730b1c60342be5b108d2d654723b3b7c2cb.zip
Largely removed all of Ledger's use of global variables, for the REPL's sake.
Diffstat (limited to 'src/item.h')
-rw-r--r--src/item.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/item.h b/src/item.h
index fbaab14b..c4d01b1d 100644
--- a/src/item.h
+++ b/src/item.h
@@ -126,16 +126,16 @@ public:
virtual optional<string> get_tag(const string& tag) const;
virtual void set_tag(const string& tag,
const optional<string>& value = none);
- virtual void parse_tags(const char * p);
- virtual void append_note(const char * p);
+ virtual void parse_tags(const char * p, int current_year = -1);
+ virtual void append_note(const char * p, int current_year = -1);
- virtual optional<date_t> actual_date() const {
- return _date;
+ virtual date_t date() const {
+ assert(_date);
+ return *_date;
}
virtual optional<date_t> effective_date() const {
return _date_eff;
}
- optional<date_t> date() const;
void set_state(state_t new_state) {
_state = new_state;