diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2022-05-17 17:10:30 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-05-24 13:09:43 (GMT) |
commit | 6ff03d463f40176389943100690cf1ca8593d739 (patch) | |
tree | 09ad876ecf9d635108df5374f8c0f5ebb4400506 /Tests | |
parent | 9409e5c04f0a534b53ce2f0e0a81c5e7e70c38f1 (diff) | |
download | CMake-6ff03d463f40176389943100690cf1ca8593d739.zip CMake-6ff03d463f40176389943100690cf1ca8593d739.tar.gz CMake-6ff03d463f40176389943100690cf1ca8593d739.tar.bz2 |
clang-tidy: address `google-readability-casting` lints
At least those involving `static_cast`.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CMakeLib/run_compile_commands.cxx | 2 | ||||
-rw-r--r-- | Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/Tests/CMakeLib/run_compile_commands.cxx b/Tests/CMakeLib/run_compile_commands.cxx index 0ebe00e..0585774 100644 --- a/Tests/CMakeLib/run_compile_commands.cxx +++ b/Tests/CMakeLib/run_compile_commands.cxx @@ -115,7 +115,7 @@ private: void Next() { - this->C = char(this->Input.get()); + this->C = static_cast<char>(this->Input.get()); if (this->Input.bad()) { this->ErrorExit("Unexpected end of file."); } diff --git a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx index daf8a2d..5c6c8d8 100644 --- a/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx +++ b/Tests/RunCMake/CTestResourceAllocation/ctresalloc.cxx @@ -89,7 +89,8 @@ static int doWrite(int argc, char const* const* argv) return 1; } int resourceGroupCount = std::atoi(resourceGroupCountEnv); - if (resourceGroups.size() != std::size_t(resourceGroupCount)) { + if (resourceGroups.size() != + static_cast<std::size_t>(resourceGroupCount)) { std::cout << "CTEST_RESOURCE_GROUP_COUNT does not match expected resource groups" << std::endl |