aboutsummaryrefslogtreecommitdiff
path: root/src/util/settings.cpp
diff options
context:
space:
mode:
authorRussell Yanofsky <russ@yanofsky.org>2019-11-11 18:32:49 -0500
committerRussell Yanofsky <russ@yanofsky.org>2019-11-13 04:20:30 -0500
commit3f7dc9b808316c1e5d677af8d9a99112568c8ccb (patch)
tree147925f360df9dbccb3ba4f936163ea8cd0ee6ff /src/util/settings.cpp
parentcd6cb9745e13a62e130b11f78a13bcc1d424b05e (diff)
refactor: Clean up long lines in settings code
Suggested by James O'Beirne <james.obeirne@gmail.com> https://github.com/bitcoin/bitcoin/pull/15934#discussion_r344366743 This commit does not change behavior.
Diffstat (limited to 'src/util/settings.cpp')
-rw-r--r--src/util/settings.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/util/settings.cpp b/src/util/settings.cpp
index af75fef310..d20f509e24 100644
--- a/src/util/settings.cpp
+++ b/src/util/settings.cpp
@@ -68,7 +68,9 @@ SettingsValue GetSetting(const Settings& settings,
// precedence over early settings, but for backwards compatibility in
// the config file the precedence is reversed for all settings except
// chain name settings.
- const bool reverse_precedence = (source == Source::CONFIG_FILE_NETWORK_SECTION || source == Source::CONFIG_FILE_DEFAULT_SECTION) && !get_chain_name;
+ const bool reverse_precedence =
+ (source == Source::CONFIG_FILE_NETWORK_SECTION || source == Source::CONFIG_FILE_DEFAULT_SECTION) &&
+ !get_chain_name;
// Weird behavior preserved for backwards compatibility: Negated
// -regtest and -testnet arguments which you would expect to override
@@ -78,7 +80,10 @@ SettingsValue GetSetting(const Settings& settings,
const bool skip_negated_command_line = get_chain_name;
// Ignore settings in default config section if requested.
- if (ignore_default_section_config && source == Source::CONFIG_FILE_DEFAULT_SECTION && !never_ignore_negated_setting) return;
+ if (ignore_default_section_config && source == Source::CONFIG_FILE_DEFAULT_SECTION &&
+ !never_ignore_negated_setting) {
+ return;
+ }
// Skip negated command line settings.
if (skip_negated_command_line && span.last_negated()) return;
@@ -111,7 +116,9 @@ std::vector<SettingsValue> GetSettingsList(const Settings& settings,
// value is followed by non-negated value, in which case config file
// settings will be brought back from the dead (but earlier command
// line settings will still be ignored).
- const bool add_zombie_config_values = (source == Source::CONFIG_FILE_NETWORK_SECTION || source == Source::CONFIG_FILE_DEFAULT_SECTION) && !prev_negated_empty;
+ const bool add_zombie_config_values =
+ (source == Source::CONFIG_FILE_NETWORK_SECTION || source == Source::CONFIG_FILE_DEFAULT_SECTION) &&
+ !prev_negated_empty;
// Ignore settings in default config section if requested.
if (ignore_default_section_config && source == Source::CONFIG_FILE_DEFAULT_SECTION) return;