Skip to content

Commit db99fdc

Browse files
style: pre-commit.ci fixes
1 parent 5717933 commit db99fdc

File tree

3 files changed

+12
-18
lines changed

3 files changed

+12
-18
lines changed

fuzz/fuzzApp.cpp

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -193,17 +193,13 @@ bool FuzzApp::compare(const FuzzApp &other) const {
193193
}
194194

195195
if(vv1 != other.vv1) {
196-
if (vv1.size() != other.vv1.size())
197-
{
196+
if(vv1.size() != other.vv1.size()) {
198197
return false;
199198
}
200-
//need to check if they are both nan
201-
for (std::size_t index = 0; index < vv1.size(); ++index)
202-
{
203-
if (vv1[index] != other.vv1[index])
204-
{
205-
if (std::isnan(vv1[index]) && std::isnan(other.vv1[index]))
206-
{
199+
// need to check if they are both nan
200+
for(std::size_t index = 0; index < vv1.size(); ++index) {
201+
if(vv1[index] != other.vv1[index]) {
202+
if(std::isnan(vv1[index]) && std::isnan(other.vv1[index])) {
207203
continue;
208204
}
209205
return false;

include/CLI/impl/App_inl.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1971,12 +1971,11 @@ App::_parse_arg(std::vector<std::string> &args, detail::Classifier current_type,
19711971
current_type = detail::Classifier::SHORT;
19721972
}
19731973
std::string dummy1, dummy2;
1974-
bool val=false;
1975-
if(detail::split_long(args.back(), dummy1, dummy2))
1976-
{
1974+
bool val = false;
1975+
if(detail::split_long(args.back(), dummy1, dummy2)) {
19771976
val = sub->_parse_arg(args, current_type, true);
19781977
}
1979-
1978+
19801979
if(val) {
19811980
if(!sub->silent_) {
19821981
parsed_subcommands_.push_back(sub);

tests/FuzzFailTest.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -335,11 +335,10 @@ TEST_CASE("app_roundtrip_custom") {
335335
CHECK(result);
336336
}
337337

338-
339-
// this test
338+
// this test
340339
TEST_CASE("app_roundtrip_parse_normal_fail") {
341-
//this is mostly checking that no unexpected errors occur
342-
//like HorribleErrors
340+
// this is mostly checking that no unexpected errors occur
341+
// like HorribleErrors
343342
CLI::FuzzApp fuzzdata;
344343
auto app = fuzzdata.generateApp();
345344
int index = GENERATE(range(1, 2));
@@ -354,7 +353,7 @@ TEST_CASE("app_roundtrip_parse_normal_fail") {
354353
} else {
355354
app->parse(parseData);
356355
}
357-
} catch(const CLI::HorribleError &/*he*/) {
356+
} catch(const CLI::HorribleError & /*he*/) {
358357
CHECK(false);
359358
} catch(const CLI::ParseError & /*e*/) {
360359
CHECK(true);

0 commit comments

Comments
 (0)