Repository navigation
[PWGCF] Fix casts - #18385
[PWGCF] Fix casts#18385vkucera wants to merge 1 commit into
Conversation
|
O2 linter results: ❌ 0 errors, |
48120c2 to
3e0cf62
Compare
Fixes C-style, redundant, wrong, and dangerous casts (found by Clang-Tidy and cpplint). - Remove redundant casts. (`readability-redundant-casting`) - Remove `const_cast`. (`cppcoreguidelines-pro-type-const-cast`) - Replace C-style casts with `static_cast`. (`google-readability-casting`, cpplint: `readability/casting`) - Replace unsafe C-style casts with `dynamic_cast`. (`cppcoreguidelines-pro-type-cstyle-cast`) - Replace `static_cast` in downcasts with `dynamic_cast`. (`cppcoreguidelines-pro-type-static-cast-downcast`) - Replace `reinterpret_cast` with `static_cast` or `dynamic_cast`. (`cppcoreguidelines-pro-type-reinterpret-cast`) - Replace two-step casting through `void*` with `reinterpret_cast`. (`bugprone-casting-through-void`)
|
Dear code owners, the PR is ready for review. |
|
Error while checking build/O2Physics/code-check for bbe899b at 2026-11-08 02:15: Full log here. |
abilandz
left a comment
There was a problem hiding this comment.
@vkucera : I approve these changes for what concerns code i am responsible for, but as we already discussed in a separate thread, please re-consider this habit of making interventations out-of-a-blue without any announcement in somebody's else code. Thanks for your understanding!
Hi @abilandz , thanks for the review and for the reminder. |
@vkucera : Thanks for your reply and clarification! The problem with the current approach is that whoever is doing important code development right now, that development needs to stopped because of your PR, and then the corresponding merge conflicts need to be resolved manually. I doubt there is anybody who is keen on resolving merging conflicts regularly - I already posted some suggestions in the original discussion, no need to repeat 'em here. |
Fixes C-style, redundant, wrong, and dangerous casts (found by Clang-Tidy and cpplint).
readability-redundant-casting)const_cast. (cppcoreguidelines-pro-type-const-cast)static_cast. (google-readability-casting, cpplint:readability/casting)dynamic_cast. (cppcoreguidelines-pro-type-cstyle-cast)static_castin downcasts withdynamic_cast. (cppcoreguidelines-pro-type-static-cast-downcast)reinterpret_castwithstatic_castordynamic_cast. (cppcoreguidelines-pro-type-reinterpret-cast)void*withreinterpret_cast. (bugprone-casting-through-void)