Skip to content

Commit 727a506

Browse files
committed
Hydrodynamics: use const reference when iterating over mesh vertices
Signed-off-by: Rhys Mainwaring <[email protected]>
1 parent 6041fad commit 727a506

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

gz-waves/src/systems/hydrodynamics/Hydrodynamics.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ void ApplyPose(
9191
it.second != std::end(_target.vertices());
9292
++it.first, ++it.second)
9393
{
94-
auto& v0 = *it.first;
95-
auto& v1 = *it.second;
94+
const auto& v0 = *it.first;
95+
const auto& v1 = *it.second;
9696
const cgal::Point3& p0 = _source.point(v0);
9797

9898
// Affine transformation
@@ -183,7 +183,7 @@ math::AxisAlignedBox CreateAxisAlignedBox(cgal::MeshPtr _mesh)
183183
double max_y = min_y;
184184
double max_z = min_z;
185185

186-
for (auto& vertex : _mesh->vertices())
186+
for (const auto& vertex : _mesh->vertices())
187187
{
188188
auto& point = _mesh->point(vertex);
189189
min_x = std::min(point.x(), min_x);

0 commit comments

Comments
 (0)