Skip to content

Conversation

ntfshard
Copy link
Contributor

🦟 Bug fix

Fixes #

Summary

General code cleanup

  • Typos fixed (codespell + ide plugin w/ other backend)
  • stl includes slightly improved (removed unused, added which is in use)

Also I found several places where public API are getting std::string not by reference, but by copy:

Screenshot 2025-03-13 035241
Screenshot 2025-03-13 041151

I guess it could be hard to change it right now (w/o breaking ABI) and I have more doubts about returning by-copy strings across whole api... Just sharing, out of scope of this PR

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

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

Signed-off-by: Maksim Derbasov <ntfs.hard@gmail.com>
"@gz-math",
"@gz-utils//:Environment",
"@gz-utils//:ImplPtr",
"@gz-utils//:NeverDestroyed",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was included in 1 file but not used across whole repo. removed in both places

Copy link
Member

Choose a reason for hiding this comment

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

👍

for reference, its last usage was removed in #1456

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, very questionable code from C++ perspective. It could be nice if we can remove it everythere to have a clean valgrind reports C:

Comment on lines -137 to +139
const std::string _groupLabel,
const std::string _axisLabel,
sdf::Noise& _noise)
const std::string &_groupLabel,
const std::string &_axisLabel,
sdf::Noise &_noise)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

it's lambda in scope, ok to add missing & here

@github-project-automation github-project-automation bot moved this from Inbox to In review in Core development Mar 13, 2025
Copy link
Collaborator

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

CI is failing

  /github/workspace/src/ParserConfig.cc:43:  Lines should be <= 80 characters long  [whitespace/line_length] [2]
  /github/workspace/src/Utils.cc:185:  Lines should be <= 80 characters long  [whitespace/line_length] [2]

Signed-off-by: Maksim Derbasov <ntfs.hard@gmail.com>
"@gz-math",
"@gz-utils//:Environment",
"@gz-utils//:ImplPtr",
"@gz-utils//:NeverDestroyed",
Copy link
Member

Choose a reason for hiding this comment

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

👍

for reference, its last usage was removed in #1456

@scpeters scpeters requested a review from ahcorde March 13, 2025 17:47
@scpeters scpeters dismissed ahcorde’s stale review March 13, 2025 17:47

concerns have been addressed

@scpeters scpeters merged commit 6b825a5 into gazebosim:sdf15 Mar 13, 2025
16 checks passed
@github-project-automation github-project-automation bot moved this from In review to Done in Core development Mar 13, 2025
@ntfshard ntfshard deleted the codecleanup branch March 13, 2025 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🏛️ ionic Gazebo Ionic 🪵 jetty Gazebo Jetty

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants