diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-27 00:40:22 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-27 02:31:08 -0600 |
commit | 0efdc0cf6f47278184eecdf47137b6253043e027 (patch) | |
tree | 1d67a02b3b7a3c202f505b420747c1aa2e7f48e7 /src/xact.cc | |
parent | bb0c5344145cd79fa54a92f236628eebbe6f2f68 (diff) | |
download | fork-ledger-0efdc0cf6f47278184eecdf47137b6253043e027.tar.gz fork-ledger-0efdc0cf6f47278184eecdf47137b6253043e027.tar.bz2 fork-ledger-0efdc0cf6f47278184eecdf47137b6253043e027.zip |
The "id" of an item now maps to its UUID
Diffstat (limited to 'src/xact.cc')
-rw-r--r-- | src/xact.cc | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/src/xact.cc b/src/xact.cc index 596b39fa..ce4c032e 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -467,30 +467,10 @@ void xact_t::add_post(post_t * post) xact_base_t::add_post(post); } -string xact_t::idstring() const -{ - std::ostringstream buf; - buf << format_date(*_date, FMT_WRITTEN); - buf << payee; - magnitude().number().print(buf); - return buf.str(); -} - -string xact_t::id() const -{ - return sha1sum(idstring()); -} - namespace { value_t get_magnitude(xact_t& xact) { return xact.magnitude(); } - value_t get_idstring(xact_t& xact) { - return string_value(xact.idstring()); - } - value_t get_id(xact_t& xact) { - return string_value(xact.id()); - } value_t get_code(xact_t& xact) { if (xact.code) @@ -554,13 +534,6 @@ expr_t::ptr_op_t xact_t::lookup(const symbol_t::kind_t kind, return WRAP_FUNCTOR(get_wrapper<&get_code>); break; - case 'i': - if (name == "id") - return WRAP_FUNCTOR(get_wrapper<&get_id>); - else if (name == "idstring") - return WRAP_FUNCTOR(get_wrapper<&get_idstring>); - break; - case 'm': if (name == "magnitude") return WRAP_FUNCTOR(get_wrapper<&get_magnitude>); |