Skip to content

Commit

Permalink
Fixed warning
Browse files Browse the repository at this point in the history
  • Loading branch information
robertosfield committed Jul 3, 2024
1 parent b77494d commit 1830e20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/state/vsgclip/vsgclip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class IntersectionHandler : public vsg::Inherit<vsg::Visitor, IntersectionHandle
if (intersector->intersections.empty()) return;

// sort the intersections front to back
std::sort(intersector->intersections.begin(), intersector->intersections.end(), [](auto lhs, auto rhs) { return lhs->ratio < rhs->ratio; });
std::sort(intersector->intersections.begin(), intersector->intersections.end(), [](auto& lhs, auto& rhs) { return lhs->ratio < rhs->ratio; });

auto& intersection = *intersector->intersections.front();
world_clipSettings->at(0) = vsg::vec4(static_cast<float>(intersection.worldIntersection.x),
Expand Down

0 comments on commit 1830e20

Please sign in to comment.