diff options
author | Johann Klähn <kljohann@gmail.com> | 2013-01-15 00:31:12 +0100 |
---|---|---|
committer | Johann Klähn <kljohann@gmail.com> | 2013-01-16 23:11:45 +0100 |
commit | 3ed53b7b3c6fb3a82f863e07414372681aa92768 (patch) | |
tree | 321c4d97e31334536b52244e08e5a6e2483dc0df /src | |
parent | 6ff7dac73f78e885637b2827457ac5e4acfded67 (diff) | |
download | fork-ledger-3ed53b7b3c6fb3a82f863e07414372681aa92768.tar.gz fork-ledger-3ed53b7b3c6fb3a82f863e07414372681aa92768.tar.bz2 fork-ledger-3ed53b7b3c6fb3a82f863e07414372681aa92768.zip |
whitespace cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/amount.cc | 2 | ||||
-rw-r--r-- | src/global.cc | 4 | ||||
-rw-r--r-- | src/global.h | 6 | ||||
-rw-r--r-- | src/journal.cc | 8 | ||||
-rw-r--r-- | src/xact.cc | 10 |
5 files changed, 15 insertions, 15 deletions
diff --git a/src/amount.cc b/src/amount.cc index 4e658212..cba9a282 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -684,7 +684,7 @@ void amount_t::in_place_ceiling() throw_(amount_error, _("Cannot ceiling an uninitialized amount")); _dup(); - + mpz_t quot; mpz_init(quot); mpz_cdiv_q(quot, mpq_numref(MP(quantity)), mpq_denref(MP(quantity))); diff --git a/src/global.cc b/src/global.cc index 3e83ba04..bc172075 100644 --- a/src/global.cc +++ b/src/global.cc @@ -477,8 +477,8 @@ void handle_debug_options(int argc, char * argv[]) #endif } else if (i + 1 < argc && std::strcmp(argv[i], "--init-file") == 0) { - _init_file = argv[i + 1]; - i++; + _init_file = argv[i + 1]; + i++; } else if (i + 1 < argc && std::strcmp(argv[i], "--debug") == 0) { #if DEBUG_ON diff --git a/src/global.h b/src/global.h index d37043fc..dc6abd78 100644 --- a/src/global.h +++ b/src/global.h @@ -153,14 +153,14 @@ See LICENSE file included with the distribution for details and disclaimer."); OPTION__ (global_scope_t, init_file_, // -i CTOR(global_scope_t, init_file_) { - if(!_init_file.empty()) + if (!_init_file.empty()) // _init_file is filled during handle_debug_options on(none, _init_file); else if (const char * home_var = std::getenv("HOME")) - on(none, (path(home_var) / ".ledgerrc").string()); + on(none, (path(home_var) / ".ledgerrc").string()); else - on(none, path("./.ledgerrc").string()); + on(none, path("./.ledgerrc").string()); }); OPTION(global_scope_t, options); diff --git a/src/journal.cc b/src/journal.cc index f45b7527..68939be6 100644 --- a/src/journal.cc +++ b/src/journal.cc @@ -134,10 +134,10 @@ account_t * journal_t::register_account(const string& name, post_t * post, // that can be expanded successfully size_t colon = name.find(':'); if(colon != string::npos) { - accounts_map::const_iterator i = account_aliases.find(name.substr(0, colon)); - if (i != account_aliases.end()) { - result = find_account((*i).second->fullname() + name.substr(colon)); - } + accounts_map::const_iterator i = account_aliases.find(name.substr(0, colon)); + if (i != account_aliases.end()) { + result = find_account((*i).second->fullname() + name.substr(colon)); + } } } } diff --git a/src/xact.cc b/src/xact.cc index 7888dadf..7ac7a9e9 100644 --- a/src/xact.cc +++ b/src/xact.cc @@ -803,12 +803,12 @@ void auto_xact_t::extend_xact(xact_base_t& xact, parse_context_t& context) post_t * new_post = new post_t(account, amt); new_post->copy_details(*post); - // A Cleared transaction implies all of its automatic posting are cleared + // A Cleared transaction implies all of its automatic posting are cleared // CPR 2012/10/23 - if(xact.state() == item_t::CLEARED){ - DEBUG("xact.extend.cleared", "CLEARED"); - new_post->set_state(item_t::CLEARED); - } + if (xact.state() == item_t::CLEARED) { + DEBUG("xact.extend.cleared", "CLEARED"); + new_post->set_state(item_t::CLEARED); + } new_post->add_flags(ITEM_GENERATED); new_post->account = |