[geos-devel] [GEOS] #636: LineSegmentIndex = operator missing a return

GEOS geos-trac at osgeo.org
Tue Jul 16 10:41:34 PDT 2013


#636: LineSegmentIndex = operator missing a return
------------------------+---------------------------------------------------
 Reporter:  goatbar     |       Owner:  geos-devel@…              
     Type:  defect      |      Status:  new                       
 Priority:  major       |   Milestone:                            
Component:  Default     |     Version:  3.3.8                     
 Severity:  Unassigned  |    Keywords:                            
------------------------+---------------------------------------------------
 {{{
 geos-3.3.8/src/simplify/LineSegmentIndex.cpp:87:2: error: control may
 reach end of non-void function [-Werror,-Wreturn-type]
 }}}
 Probably should be fixed by adding a return *this; to the end of the
 equals operator.
 {{{
         LineSegmentVisitor& operator=(const LineSegmentVisitor& o)
         {
                 if ( this == &o ) return *this;
                 querySeg = o.querySeg;
                 items.reset(new vector<LineSegment*>(*(o.items.get())));
                 return *this;  // <-- missing line
         }
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/geos/ticket/636>
GEOS <http://geos.refractions.net/>
GEOS (Geometry Engine - Open Source) is a C++ port of the Java Topology Suite (JTS).


More information about the geos-devel mailing list