diff --git a/examples/state/vsgclip/vsgclip.cpp b/examples/state/vsgclip/vsgclip.cpp index effd63cb..4377d925 100644 --- a/examples/state/vsgclip/vsgclip.cpp +++ b/examples/state/vsgclip/vsgclip.cpp @@ -74,7 +74,7 @@ class IntersectionHandler : public vsg::Inheritintersections.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(intersection.worldIntersection.x),