clang-tidy: address google-readability-casting lints

At least those involving `static_cast`.
This commit is contained in:
Ben Boeckel
2022-05-17 13:10:30 -04:00
committed by Brad King
parent 9409e5c04f
commit 6ff03d463f
30 changed files with 95 additions and 73 deletions

View File

@@ -460,8 +460,8 @@ bool cmForEachCommand(std::vector<std::string> const& args,
// in the `fb->Args` vector. The first item is the iteration variable
// name...
const std::size_t iter_cnt = 2u +
int(start < stop) * (stop - start) / std::abs(step) +
int(start > stop) * (start - stop) / std::abs(step);
static_cast<int>(start < stop) * (stop - start) / std::abs(step) +
static_cast<int>(start > stop) * (start - stop) / std::abs(step);
fb->Args.resize(iter_cnt);
fb->Args.front() = args.front();
auto cc = start;