whitespace cleanup

This commit is contained in:
Johann Klähn 2013-01-15 00:31:12 +01:00
parent 6ff7dac73f
commit 3ed53b7b3c
5 changed files with 15 additions and 15 deletions

View file

@ -477,8 +477,8 @@ void handle_debug_options(int argc, char * argv[])
#endif #endif
} }
else if (i + 1 < argc && std::strcmp(argv[i], "--init-file") == 0) { else if (i + 1 < argc && std::strcmp(argv[i], "--init-file") == 0) {
_init_file = argv[i + 1]; _init_file = argv[i + 1];
i++; i++;
} }
else if (i + 1 < argc && std::strcmp(argv[i], "--debug") == 0) { else if (i + 1 < argc && std::strcmp(argv[i], "--debug") == 0) {
#if DEBUG_ON #if DEBUG_ON

View file

@ -153,14 +153,14 @@ See LICENSE file included with the distribution for details and disclaimer.");
OPTION__ OPTION__
(global_scope_t, init_file_, // -i (global_scope_t, init_file_, // -i
CTOR(global_scope_t, init_file_) { CTOR(global_scope_t, init_file_) {
if(!_init_file.empty()) if (!_init_file.empty())
// _init_file is filled during handle_debug_options // _init_file is filled during handle_debug_options
on(none, _init_file); on(none, _init_file);
else else
if (const char * home_var = std::getenv("HOME")) if (const char * home_var = std::getenv("HOME"))
on(none, (path(home_var) / ".ledgerrc").string()); on(none, (path(home_var) / ".ledgerrc").string());
else else
on(none, path("./.ledgerrc").string()); on(none, path("./.ledgerrc").string());
}); });
OPTION(global_scope_t, options); OPTION(global_scope_t, options);

View file

@ -134,10 +134,10 @@ account_t * journal_t::register_account(const string& name, post_t * post,
// that can be expanded successfully // that can be expanded successfully
size_t colon = name.find(':'); size_t colon = name.find(':');
if(colon != string::npos) { if(colon != string::npos) {
accounts_map::const_iterator i = account_aliases.find(name.substr(0, colon)); accounts_map::const_iterator i = account_aliases.find(name.substr(0, colon));
if (i != account_aliases.end()) { if (i != account_aliases.end()) {
result = find_account((*i).second->fullname() + name.substr(colon)); result = find_account((*i).second->fullname() + name.substr(colon));
} }
} }
} }
} }

View file

@ -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); post_t * new_post = new post_t(account, amt);
new_post->copy_details(*post); 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 // CPR 2012/10/23
if(xact.state() == item_t::CLEARED){ if (xact.state() == item_t::CLEARED) {
DEBUG("xact.extend.cleared", "CLEARED"); DEBUG("xact.extend.cleared", "CLEARED");
new_post->set_state(item_t::CLEARED); new_post->set_state(item_t::CLEARED);
} }
new_post->add_flags(ITEM_GENERATED); new_post->add_flags(ITEM_GENERATED);
new_post->account = new_post->account =