[geos-devel] Re: gettimeofday for win32

strk at refractions.net strk at refractions.net
Fri Dec 3 17:54:43 EST 2004


On Fri, Dec 03, 2004 at 01:32:18PM -0500, Frank Warmerdam wrote:
> On Fri, 3 Dec 2004 17:44:35 +0100, strk at refractions.net
> <strk at refractions.net> wrote:
> > Well.. my idea was to have read-only or read-write access to internal
> > storage, but this is really no
> > > > >  t applicable since the interface states
> > that the returned vector is not guaranteed to be the internal
> > representation of the sequence.
> > 
> > Unfortunately we cannot also give non const result as for our specific
> > DefaultCoordinateSequence case the returned vector is actually the
> > internal representation, and messing w/ it would modify the object.
> 
> Strk,
> 
> Whether DefaultCoordinateSequence is returning the internal
> representation or not, the method was returning the result
> without a const attribute before I ever touched it as far as I 
> know.  I think this area needs further consideration.    

I know Frank. It was my fault.

> Basically, if you are willing to force any derived type to 
> manage copies internally, you could *just* have the const
> return type, and it would be up to the object to manage 
> generated copies of the coordinates internally, cleaning them
> up when the object is destroyed (or modified?). 

Yes, this is what I did. Changes are in CVS.
Please let me know if everything still works for you.

--strk;



More information about the geos-devel mailing list