summaryrefslogtreecommitdiff
path: root/Source/cmProjectCommand.cxx
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2022-05-17 13:10:30 -0400
committerBrad King <brad.king@kitware.com>2022-05-24 09:09:43 -0400
commit6ff03d463f40176389943100690cf1ca8593d739 (patch)
tree09ad876ecf9d635108df5374f8c0f5ebb4400506 /Source/cmProjectCommand.cxx
parent9409e5c04f0a534b53ce2f0e0a81c5e7e70c38f1 (diff)
downloadcmake-6ff03d463f40176389943100690cf1ca8593d739.tar.gz
clang-tidy: address `google-readability-casting` lints
At least those involving `static_cast`.
Diffstat (limited to 'Source/cmProjectCommand.cxx')
-rw-r--r--Source/cmProjectCommand.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmProjectCommand.cxx b/Source/cmProjectCommand.cxx
index 04d99c96ed..4b65fb9fb4 100644
--- a/Source/cmProjectCommand.cxx
+++ b/Source/cmProjectCommand.cxx
@@ -242,9 +242,9 @@ bool cmProjectCommand(std::vector<std::string> const& args,
const int vc = std::sscanf(version.c_str(), "%u.%u.%u.%u", &v[0], &v[1],
&v[2], &v[3]);
for (auto i = 0u; i < MAX_VERSION_COMPONENTS; ++i) {
- if (int(i) < vc) {
+ if (static_cast<int>(i) < vc) {
std::snprintf(vb[i], maxIntLength, "%u", v[i]);
- version_string += &"."[std::size_t(i == 0)];
+ version_string += &"."[static_cast<std::size_t>(i == 0)];
version_string += vb[i];
version_components[i] = vb[i];
} else {