Skip to content

Fix static_cast that triggers compile errors with -Wpedantic#1632

Merged
iche033 merged 2 commits intogazebosim:mainfrom
jhanca-robotecai:jh/fix_casting
Mar 3, 2026
Merged

Fix static_cast that triggers compile errors with -Wpedantic#1632
iche033 merged 2 commits intogazebosim:mainfrom
jhanca-robotecai:jh/fix_casting

Conversation

@jhanca-robotecai
Copy link
Copy Markdown
Contributor

🦟 Bug fix

Fixes compile errors

Summary

The code does not build with some strict rules such as -Wpedantic due to incorrect casts. This PR fixes the issue.

Checklist

  • Signed all commits for DCO
  • Added a screen capture or video to the PR description that demonstrates the fix (as needed)
  • Added tests
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • Updated Bazel files (if adding new files). Created an issue otherwise.
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers
  • Was GenAI used to generate this PR? If so, make sure to add "Generated-by" to your commits. (See this policy for more info.)

Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining Signed-off-by and Generated-by messages.

Backports: If this is a backport, please use Rebase and Merge instead.

Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Mar 3, 2026
@iche033 iche033 merged commit 645dd54 into gazebosim:main Mar 3, 2026
13 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Mar 3, 2026
@iche033
Copy link
Copy Markdown
Contributor

iche033 commented Mar 3, 2026

@Mergifyio backport sdf16 sdf15 sdf14 sdf12

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Mar 3, 2026

backport sdf16 sdf15 sdf14 sdf12

✅ Backports have been created

Details

Cherry-pick of 645dd54 has failed:

On branch mergify/bp/sdf12/pr-1632
Your branch is up to date with 'origin/sdf12'.

You are currently cherry-picking commit 645dd548.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   src/Camera.cc
	both modified:   src/ParticleEmitter.cc
	both modified:   src/Sensor.cc

no changes added to commit (use "git add" and/or "git commit -a")

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

mergify bot pushed a commit that referenced this pull request Mar 3, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
mergify bot pushed a commit that referenced this pull request Mar 3, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
mergify bot pushed a commit that referenced this pull request Mar 3, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
mergify bot pushed a commit that referenced this pull request Mar 3, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)

# Conflicts:
#	src/Camera.cc
#	src/ParticleEmitter.cc
#	src/Sensor.cc
iche033 added a commit that referenced this pull request Mar 4, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
iche033 added a commit that referenced this pull request Mar 4, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
iche033 added a commit that referenced this pull request Mar 4, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
iche033 pushed a commit that referenced this pull request Mar 4, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
Signed-off-by: Ian Chen <ichen@openrobotics.org>

# Conflicts:
#	src/Camera.cc
#	src/ParticleEmitter.cc
#	src/Sensor.cc
iche033 pushed a commit that referenced this pull request Mar 4, 2026
Signed-off-by: Jan Hanca <jan.hanca@robotec.ai>
Co-authored-by: Ian Chen <ichen@openrobotics.org>
(cherry picked from commit 645dd54)
Signed-off-by: Ian Chen <ichen@openrobotics.org>

# Conflicts:
#	src/Camera.cc
#	src/ParticleEmitter.cc
#	src/Sensor.cc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants