Repository navigation
[PWGDQ] Fix casts - #18386
[PWGDQ] Fix casts#18386vkucera wants to merge 1 commit into
Conversation
|
O2 linter results: ❌ 0 errors, |
mguilbau
left a comment
There was a problem hiding this comment.
Hi @vkucera,
Thanks a lot for this. That is a large clean-up of the DQ code. Nevertheless, I see you have move all our reinterpreted_cast to dynamic_cast. While I do understand the reasoning behind this, I recall (I was not DQ convener at that time) that this was attempted and we ended up in situation where the code was to slow and Table Maker was hitting some limits on HY.
@iarsene do you recall something of that sort? I might be mistaken
Hi @mguilbau , thanks for the feedback. I could use |
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`)
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)