clang-tidy fixes again (#1087)

* [clang-tidy] Do not use else after return

Found with readability-else-after-return

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* [clang-tidy] Convert several loops to be range based

Found with modernize-loop-convert

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* [clang-tidy] Replace deprecated C headers

Found with modernize-deprecated-headers

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* [clang-tidy] Use auto where applicable

Found with modernize-use-auto

Signed-off-by: Rosen Penev <rosenp@gmail.com>

* .clang-tidy: Add these checks
This commit is contained in:
Rosen Penev
2020-02-02 20:03:45 -08:00
committed by GitHub
parent 6317f9a406
commit edf528edfa
7 changed files with 35 additions and 41 deletions

View File

@@ -1476,9 +1476,7 @@ void ValueTest::checkMemberCount(Json::Value& value,
JSONTEST_ASSERT_PRED(checkConstMemberCount(value, expectedCount));
}
ValueTest::IsCheck::IsCheck()
= default;
ValueTest::IsCheck::IsCheck() = default;
void ValueTest::checkIs(const Json::Value& value, const IsCheck& check) {
JSONTEST_ASSERT_EQUAL(check.isObject_, value.isObject());
@@ -3752,8 +3750,8 @@ JSONTEST_FIXTURE_LOCAL(FuzzTest, fuzzDoesntCrash) {
int main(int argc, const char* argv[]) {
JsonTest::Runner runner;
for (auto it = local_.begin(); it != local_.end(); it++) {
runner.add(*it);
for (auto& local : local_) {
runner.add(local);
}
return runner.runCommandLine(argc, argv);