Skip to content

Commit 397e2f4

Browse files
style: pre-commit.ci fixes
1 parent e1e575f commit 397e2f4

File tree

2 files changed

+6
-11
lines changed

2 files changed

+6
-11
lines changed

include/CLI/impl/App_inl.hpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1490,18 +1490,13 @@ CLI11_INLINE bool App::_parse_single_config(const ConfigItem &item, std::size_t
14901490
}
14911491
if(op == nullptr) {
14921492
op = get_option_no_throw(item.name);
1493-
}
1494-
else if (!op->get_configurable())
1495-
{
1493+
} else if(!op->get_configurable()) {
14961494
auto *testop = get_option_no_throw(item.name);
1497-
if (testop != nullptr && testop->get_configurable())
1498-
{
1499-
op=testop;
1495+
if(testop != nullptr && testop->get_configurable()) {
1496+
op = testop;
15001497
}
15011498
}
1502-
}
1503-
else if (!op->get_configurable())
1504-
{
1499+
} else if(!op->get_configurable()) {
15051500
if(item.name.size() == 1) {
15061501
auto *testop = get_option_no_throw("-" + item.name);
15071502
if(testop != nullptr && testop->get_configurable()) {

tests/ConfigFileTest.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1162,11 +1162,11 @@ TEST_CASE_METHOD(TApp, "notConfigurableOptionOverload2", "[config]") {
11621162
app.set_config("--conf", next);
11631163
int two{7};
11641164
int three{5};
1165-
app.add_option("-m",three)->configurable(false);
1165+
app.add_option("-m", three)->configurable(false);
11661166
app.add_option("m", two);
11671167

11681168
run();
1169-
CHECK(three==5);
1169+
CHECK(three == 5);
11701170
CHECK(two == 99);
11711171
}
11721172

0 commit comments

Comments
 (0)