diff options
author | John Wiegley <johnw@newartisans.com> | 2012-03-07 08:34:15 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-03-07 08:34:15 -0600 |
commit | 7bb83173dae617b8e754fff8e52390ff9664873b (patch) | |
tree | 53fb7d1b4d81299f3095006730984d7ad0143403 | |
parent | 04f884b14fd7cc396c9d442685df8489ae7e8a15 (diff) | |
download | fork-ledger-7bb83173dae617b8e754fff8e52390ff9664873b.tar.gz fork-ledger-7bb83173dae617b8e754fff8e52390ff9664873b.tar.bz2 fork-ledger-7bb83173dae617b8e754fff8e52390ff9664873b.zip |
Added some missing DEBUG #if's
-rw-r--r-- | src/account.cc | 2 | ||||
-rw-r--r-- | src/filters.cc | 2 | ||||
-rw-r--r-- | src/pool.cc | 4 | ||||
-rw-r--r-- | src/textual.cc | 2 | ||||
-rw-r--r-- | src/xact.cc | 2 |
5 files changed, 12 insertions, 0 deletions
diff --git a/src/account.cc b/src/account.cc index 29c05719..d772368c 100644 --- a/src/account.cc +++ b/src/account.cc @@ -93,7 +93,9 @@ account_t * account_t::find_account(const string& acct_name, std::pair<accounts_map::iterator, bool> result = #endif accounts.insert(accounts_map::value_type(first, account)); +#if defined(DEBUG_ON) assert(result.second); +#endif } else { account = (*i).second; } diff --git a/src/filters.cc b/src/filters.cc index 34df2056..3a975920 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -891,7 +891,9 @@ void subtotal_posts::operator()(post_t& post) std::pair<values_map::iterator, bool> result = #endif values.insert(values_pair(acct->fullname(), acct_value_t(acct, temp))); +#if defined(DEBUG_ON) assert(result.second); +#endif } else { post.add_to_value((*i).second.value, amount_expr); } diff --git a/src/pool.cc b/src/pool.cc index a6ae0919..fd661fe1 100644 --- a/src/pool.cc +++ b/src/pool.cc @@ -75,7 +75,9 @@ commodity_t * commodity_pool_t::create(const string& symbol) #endif commodities.insert(commodities_map::value_type (commodity->base_symbol(), commodity)); +#if defined(DEBUG_ON) assert(result.second); +#endif commodity_price_history.add_commodity(*commodity.get()); @@ -219,7 +221,9 @@ commodity_pool_t::create(commodity_t& comm, annotated_commodities.insert(annotated_commodities_map::value_type (annotated_commodities_map::key_type (comm.symbol(), details), commodity)); +#if defined(DEBUG_ON) assert(result.second); +#endif return commodity.get(); } diff --git a/src/textual.cc b/src/textual.cc index 1d1835e3..66972fb3 100644 --- a/src/textual.cc +++ b/src/textual.cc @@ -950,7 +950,9 @@ void instance_t::account_alias_directive(account_t * account, string alias) #endif context.journal->account_aliases.insert (accounts_map::value_type(alias, account)); +#if defined(DEBUG_ON) assert(result.second); +#endif } void instance_t::alias_directive(char * line) diff --git a/src/xact.cc b/src/xact.cc index 4ec40f69..4e43e680 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -346,7 +346,9 @@ bool xact_base_t::finalize() as_annotated_commodity(*pair.first).details : annotation_t()), pair.second)); +#if defined(DEBUG_ON) assert(result.second); +#endif } bool first = true; |