[geos-devel] RE: CoordinateListFactory

Norman Vine nhv at cape.com
Thu Feb 6 22:48:12 EST 2003


gcc 3.2 has a problem in geometry.cpp

Coordinate& Geometry::minCoordinate(CoordinateList* coordinates){
 vector<Coordinate> v(*(coordinates->toVector()));
< line 80 > sort(v.begin(),v.end(),lessThen);
 return v.front();
}

< comment >
If this is called a lot it would probably be faster to have a
CoordinateList::minCoordinate() method so that the
vector copy and sort need not be performed
< / comment >

It is nice to see some action in the CVS

Cheers

Norman

g++ -DHAVE_CONFIG_H -I. -I../../../source/geom -I../../source/headers -I../../../source/headers -DGEOS_VERSION=\"1\" -O2 -MT
Geometry.lo -MD -MP -MF .deps/Geometry.Tpo -c ../../../source/geom/Geometry.cpp  -DPIC -DPIC -o Geometry.o
/usr/include/c++/3.2/bits/stl_algo.h: In function `const _Tp&
   std::__median(const _Tp&, const _Tp&, const _Tp&, _Compare) [with _Tp =
   Coordinate, _Compare = bool (*)(Coordinate&, Coordinate&)]':
/usr/include/c++/3.2/bits/stl_algo.h:2147:   instantiated from `void std::__introsort_loop(_RandomAccessIter, _RandomAccessIter,
_Size, _Compare) [with _RandomAccessIter = __gnu_cxx::__normal_iterator<Coordinate*, std::vector<Coordinate,
std::allocator<Coordinate> > >, _Size = int, _Compare = bool (*)(Coordinate&, Coordinate&)]'
/usr/include/c++/3.2/bits/stl_algo.h:2209:   instantiated from `void std::sort(_RandomAccessIter, _RandomAccessIter, _Compare) [with
_RandomAccessIter = __gnu_cxx::__normal_iterator<Coordinate*, std::vector<Coordinate, std::allocator<Coordinate> > >, _Compare =
bool (*)(Coordinate&, Coordinate&)]'
../../../source/geom/Geometry.cpp:80:   instantiated from here
/usr/include/c++/3.2/bits/stl_algo.h:124: could not convert `__a' to `
   Coordinate&'
/usr/include/c++/3.2/bits/stl_algo.h:125: could not convert `__b' to `
   Coordinate&'
/usr/include/c++/3.2/bits/stl_algo.h:127: could not convert `__a' to `
   Coordinate&'
/usr/include/c++/3.2/bits/stl_algo.h:131: could not convert `__a' to `
   Coordinate&'
/usr/include/c++/3.2/bits/stl_algo.h:133: could not convert `__b' to `






More information about the geos-devel mailing list