diff options
author | John Wiegley <johnw@newartisans.com> | 2009-02-08 23:28:30 -0400 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2009-02-08 23:28:30 -0400 |
commit | f50def86c4a1203837a8f97066d9d4dfd268e0f1 (patch) | |
tree | c717ba4efb0ba09113111e1c45f45e770e5b17b9 /src/format.cc | |
parent | 57d98ac1207241c32ee19c71b4d621c313697bce (diff) | |
download | fork-ledger-f50def86c4a1203837a8f97066d9d4dfd268e0f1.tar.gz fork-ledger-f50def86c4a1203837a8f97066d9d4dfd268e0f1.tar.bz2 fork-ledger-f50def86c4a1203837a8f97066d9d4dfd268e0f1.zip |
Moved get_partial_name from format.cc into account_t, where it belongs.
Diffstat (limited to 'src/format.cc')
-rw-r--r-- | src/format.cc | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/format.cc b/src/format.cc index c4683876..3bbb2b13 100644 --- a/src/format.cc +++ b/src/format.cc @@ -30,7 +30,7 @@ */ #include "format.h" -#include "account.h" +#include "scope.h" namespace ledger { @@ -59,28 +59,6 @@ void format_t::element_t::dump(std::ostream& out) const } } -namespace { - string partial_account_name(account_t& account) - { - string name; - - for (account_t * acct = &account; - acct && acct->parent; - acct = acct->parent) { - if (acct->has_xdata() && - acct->xdata().has_flags(ACCOUNT_EXT_DISPLAYED)) - break; - - if (name.empty()) - name = acct->name; - else - name = acct->name + ":" + name; - } - - return name; - } -} - format_t::element_t * format_t::parse_elements(const string& fmt) { std::auto_ptr<element_t> result; |