[geos-devel] Deleting PrecisionModels

Norman Vine nhv at cape.com
Tue Apr 8 13:48:05 EDT 2003


David Blasby writes:
>
> I'm getting this compile warning (with -Wall).  I couldnt find what its
> complaining about.
>
> In file included from /usr/local/include/geos/io.h:10,
>                  from postgis_GEOSwrapper.cpp:13:
> /usr/local/include/geos/geom.h:195: warning: `class BasicCoordinateList'
> has virtual functions but
> non-virtual destructor
> /usr/local/include/geos/geom.h:226: warning: `class PointCoordinateList'
> has virtual functions but
> non-virtual destructor

Since there are virtual methods the detructors should be declared as virtual

ie in geom.h
change from
  ~BasicCoordinateList();
to
  virtual ~BasicCoordinateList();

The .cpp files do not need a change

Norman




More information about the geos-devel mailing list