Fix clang warnings.#267
Fix clang warnings.#267scpeters merged 1 commit intogazebosim:ign-math6from clalancette:clalancette/fix-clang-warnings
Conversation
When building Material.cc with clang, it warns that the loop construct used is a reference, but a copy is going to be made anyway because of a const/non-const mismatch. Fix this by adding const to the loop variable type, which removes the warning and should be more efficient. Signed-off-by: Chris Lalancette <clalancette@openrobotics.org>
Codecov Report
@@ Coverage Diff @@
## ign-math6 #267 +/- ##
==========================================
Coverage 99.41% 99.41%
==========================================
Files 67 67
Lines 6374 6374
==========================================
Hits 6337 6337
Misses 37 37
Continue to review full report at Codecov.
|
|
Thank you! Any idea when a new tag/release will be made here? I'd like to update https://github.com/ignition-release/ignition_math6_vendor with a tag that contains this fix. Alternatively, I can switch the vendor package to use a git hash number instead. |
We can make one now: #268 |
When building Material.cc with clang, it warns that the loop
construct used is a reference, but a copy is going to be made
anyway because of a const/non-const mismatch. Fix this by
adding const to the loop variable type, which removes the
warning and should be more efficient.
Signed-off-by: Chris Lalancette clalancette@openrobotics.org
🦟 Bug fix
Fixes #
Summary
Fixes warnings that come when building ign-math6 with clang. See https://ci.ros2.org/view/nightly/job/nightly_linux_clang_libcxx/940/clang/new/ for the warnings themselves.
Checklist
codecheckpassed (See contributing)Note to maintainers: Remember to use Squash-Merge