Skip to content

Code cleanup (backport #1217)#1219

Merged
ahcorde merged 1 commit intogz-rendering9from
mergify/bp/gz-rendering9/pr-1217
Jan 7, 2026
Merged

Code cleanup (backport #1217)#1219
ahcorde merged 1 commit intogz-rendering9from
mergify/bp/gz-rendering9/pr-1217

Conversation

@mergify
Copy link
Copy Markdown
Contributor

@mergify mergify bot commented Jan 7, 2026

🦟 Bug fix

Fixes #

Summary

Various code cleanup and fixes:

  • unnecessary copying (e.g. in range-for loop or from iterator)
  • code simplification (like std::string().compare("..") vs operator == or do-while loop replaced by range-for)
  • fixed CppCheck warning in RenderPassByIndex
  • fixed CppCheck warning of hiding: engine local variable vs engine function in the same namespace
  • clarified counter type for textures (auto i = 0u will produce unsinged int, but it should be uint64_t) and some other loops
  • raii for std::mutex (behaviour should be the same, just safer approach, at least in callbacks)
  • define -> constexpr
  • GZ_ASSERT to static_assert due to we comparing 2 compile-time constants
  • typos

Nothing outstanding or interesting

Checklist

  • Signed all commits for DCO
  • 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)
  • 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.


This is an automatic backport of pull request #1217 done by [Mergify](https://mergify.com).

Signed-off-by: Maksim Derbasov <ntfs.hard@gmail.com>
(cherry picked from commit 7ac8abc)
@mergify mergify bot requested a review from iche033 as a code owner January 7, 2026 03:30
@mergify mergify bot mentioned this pull request Jan 7, 2026
9 tasks
@github-actions github-actions bot added the 🏛️ ionic Gazebo Ionic label Jan 7, 2026
@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Jan 7, 2026
@ahcorde ahcorde merged commit f9e6fd2 into gz-rendering9 Jan 7, 2026
16 of 17 checks passed
@ahcorde ahcorde deleted the mergify/bp/gz-rendering9/pr-1217 branch January 7, 2026 09:45
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Jan 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏛️ ionic Gazebo Ionic

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants