summaryrefslogtreecommitdiff
path: root/format.cc
diff options
context:
space:
mode:
Diffstat (limited to 'format.cc')
-rw-r--r--format.cc13
1 files changed, 5 insertions, 8 deletions
diff --git a/format.cc b/format.cc
index 48cd7f7a..035f9268 100644
--- a/format.cc
+++ b/format.cc
@@ -30,10 +30,7 @@
*/
#include "format.h"
-#include "error.h"
-#include "util.h"
-
-#include <cstdlib>
+#include "account.h"
namespace ledger {
@@ -70,15 +67,15 @@ void format_t::element_t::dump(std::ostream& out) const
}
namespace {
- string partial_account_name(const account_t& account)
+ string partial_account_name(account_t& account)
{
string name;
- for (const account_t * acct = &account;
+ for (account_t * acct = &account;
acct && acct->parent;
acct = acct->parent) {
- if (account_has_xdata(*acct) &&
- account_xdata_(*acct).dflags & ACCOUNT_DISPLAYED)
+ if (acct->has_xdata() &&
+ acct->xdata().has_flags(ACCOUNT_EXT_DISPLAYED))
break;
if (name.empty())