Repository navigation
[PWGEM] Fix casts - #18387
[PWGEM] Fix casts#18387
Conversation
|
O2 linter results: ❌ 0 errors, |
This comment was marked as outdated.
This comment was marked as outdated.
ae30eb3 to
d828782
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. |
This comment was marked as outdated.
This comment was marked as outdated.
|
@vkucera is this ready for review again with the latest commit? |
Hi @mhemmer-cern , now it should be OK. |
This comment was marked as outdated.
This comment was marked as outdated.
|
Error while checking build/O2Physics/code-check for d9c35ef at 2026-11-07 23:47: Full log here. |
|
Dear @amaringarcia @dsekihat @feisenhu @hscheid @jokonig @mhemmer-cern @mikesas @rbailhac @reygers, can you please review the PR? |
|
Hi @vkucera , nice to read "Dear code owners, the PR is ready for review. This commit is breaking our analysis on hyperloop. One example is here: Do you have any suggestions how to fix it ? Thanks, |
Hi @rbailhac , the commit is not breaking your analysis. Your analysis was already broken before. This commit just makes the problem appear. The solution depends on what type of histogram you need in |
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)