diff --git a/include/osgUtil/IntersectVisitor b/include/osgUtil/IntersectVisitor index b012bedf6..12f873e62 100644 --- a/include/osgUtil/IntersectVisitor +++ b/include/osgUtil/IntersectVisitor @@ -107,9 +107,11 @@ class OSGUTIL_EXPORT IntersectVisitor : public osg::NodeVisitor void addLineSegment(osg::LineSegment* seg); typedef std::vector HitList; - typedef std::map LineSegmentHitListMap; - HitList& getHitList(osg::LineSegment* seg) { return _segHitList[seg]; } - int getNumHits(osg::LineSegment* seg) { return _segHitList[seg].size(); } + typedef std::map LineSegmentHitListMap; + + HitList& getHitList(const osg::LineSegment* seg) { return _segHitList[seg]; } + + int getNumHits(const osg::LineSegment* seg) { return _segHitList[seg].size(); } bool hits();