summaryrefslogtreecommitdiff
path: root/src/timelog.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-02-03 00:59:58 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-02-03 01:00:21 -0400
commit3db0accc68bdc0d62b51d2b3f3702857a99c9004 (patch)
tree80db03b358793c7d67c7797cfa6ae01d48b5e0dd /src/timelog.cc
parent177b5adc985dc047e2aae9d1c64c1b583342610c (diff)
downloadfork-ledger-3db0accc68bdc0d62b51d2b3f3702857a99c9004.tar.gz
fork-ledger-3db0accc68bdc0d62b51d2b3f3702857a99c9004.tar.bz2
fork-ledger-3db0accc68bdc0d62b51d2b3f3702857a99c9004.zip
Added braces to avoid a compiler warning.
Diffstat (limited to 'src/timelog.cc')
-rw-r--r--src/timelog.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/timelog.cc b/src/timelog.cc
index 31c8e6da..b22b2e60 100644
--- a/src/timelog.cc
+++ b/src/timelog.cc
@@ -126,10 +126,12 @@ void time_log_t::clock_in(const datetime_t& checkin,
{
time_entry_t event(checkin, account, desc);
- if (! time_entries.empty())
- foreach (time_entry_t& time_entry, time_entries)
+ if (! time_entries.empty()) {
+ foreach (time_entry_t& time_entry, time_entries) {
if (event.account == time_entry.account)
throw parse_error("Cannot double check-in to the same account");
+ }
+ }
time_entries.push_back(event);
}