Repository navigation
[PWGDQ] Fix casts - #18386
Draft
vkucera wants to merge 1 commit into
Draft
[PWGDQ] Fix casts#18386vkucera wants to merge 1 commit into
vkucera wants to merge 1 commit into
Conversation
|
O2 linter results: ❌ 0 errors, |
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`)
vkucera
marked this pull request as ready for review
October 21, 2026 17:01
vkucera
requested review from
XiaozhiBai,
alibuild,
iarsene,
mcoquet642 and
mguilbau
as code owners
October 21, 2026 17:01
Collaborator
mguilbau
reviewed
Oct 21, 2026
mguilbau
left a comment
Collaborator
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
vkucera
marked this pull request as draft
October 21, 2026 23:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)