Skip to content

[Tutorial,PWGCF,PWGEM,PWGLF,PWGUD] Fix casts - #18394

Open
vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:cast-Tutorials
Open

vkucera wants to merge 1 commit into
AliceO2Group:masterfrom
vkucera:cast-Tutorials

Conversation

@vkucera

@vkucera vkucera commented Oct 21, 2026

Copy link
Copy Markdown
Collaborator

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)

@github-actions

Copy link
Copy Markdown

O2 linter results: ❌ 0 errors, ⚠️ 304 warnings, 🔕 0 disabled

@github-actions github-actions Bot changed the title Fix casts [Tutorial,PWGCF,PWGEM,PWGLF,PWGUD] Fix casts Oct 21, 2026
@vkucera
vkucera marked this pull request as ready for review October 21, 2026 16:48
@vkucera
vkucera requested review from a team, ddobrigk and ktf as code owners October 21, 2026 16:48

@amatyja amatyja left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you Vit, UD is ok.

@vkucera
vkucera marked this pull request as draft October 21, 2026 23:28
@vkucera
vkucera force-pushed the cast-Tutorials branch 2 times, most recently from 949ea8b to e0f1717 Compare October 22, 2026 17:03
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
vkucera marked this pull request as ready for review October 26, 2026 15:24
@vkucera

vkucera commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator Author

This PR is ready for review.

@alcaliva
alcaliva enabled auto-merge (squash) October 27, 2026 11:01
@vkucera
vkucera disabled auto-merge October 29, 2026 23:26
@vkucera
vkucera enabled auto-merge (squash) October 29, 2026 23:26
@vkucera

vkucera commented Oct 30, 2026

Copy link
Copy Markdown
Collaborator Author

@jgrosseo, @victor-gonzalez, @zchochul Can you please review the PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

4 participants