summaryrefslogtreecommitdiff
path: root/src/textual.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2010-06-04 06:02:00 -0400
committerJohn Wiegley <johnw@newartisans.com>2010-06-04 06:02:00 -0400
commitb848ace76866188701a6a704a9531c4eeb2bc71a (patch)
tree6fdb3e1cf8a8239c89c03907447a08402bef391b /src/textual.cc
parentf16a5382ed9a9750c69595e5752f80e39cf7a4b8 (diff)
downloadfork-ledger-b848ace76866188701a6a704a9531c4eeb2bc71a.tar.gz
fork-ledger-b848ace76866188701a6a704a9531c4eeb2bc71a.tar.bz2
fork-ledger-b848ace76866188701a6a704a9531c4eeb2bc71a.zip
Allow opt -NDEBUG build to complete without warnings
Diffstat (limited to 'src/textual.cc')
-rw-r--r--src/textual.cc10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/textual.cc b/src/textual.cc
index 9a49edd4..85b1a14b 100644
--- a/src/textual.cc
+++ b/src/textual.cc
@@ -695,8 +695,10 @@ void instance_t::master_account_directive(char * line)
{
if (account_t * acct = context.top_account()->find_account(line))
context.state_stack.push_front(acct);
+#if !defined(NO_ASSERTS)
else
assert(! "Failed to create account");
+#endif
}
void instance_t::end_directive(char * kind)
@@ -763,8 +765,12 @@ void instance_t::payee_mapping_directive(char * line)
(payee_mapping_t(mask_t(regex), payee));
while (peek_whitespace_line()) {
+#if defined(NO_ASSERTS)
+ read_line(line);
+#else
std::streamsize len = read_line(line);
assert(len > 0);
+#endif
regex = skip_ws(line);
if (! *regex)
@@ -786,8 +792,12 @@ void instance_t::account_mapping_directive(char * line)
context.top_account()->find_account(account_name)));
while (peek_whitespace_line()) {
+#if defined(NO_ASSERTS)
+ read_line(line);
+#else
std::streamsize len = read_line(line);
assert(len > 0);
+#endif
payee_regex = skip_ws(line);
if (! *payee_regex)