diff --git a/src/Lib/Polygon/polygon.cxx b/src/Lib/Polygon/polygon.cxx index 51535ea5..c61d66b8 100644 --- a/src/Lib/Polygon/polygon.cxx +++ b/src/Lib/Polygon/polygon.cxx @@ -273,9 +273,9 @@ void TGPolygon::shift( double lon, double lat ) { void TGPolygon::write( const string& file ) const { FILE *fp = fopen( file.c_str(), "w" ); - fprintf(fp, "%d\n", poly.size()); + fprintf(fp, "%ld\n", poly.size()); for ( int i = 0; i < (int)poly.size(); ++i ) { - fprintf(fp, "%d\n", poly[i].size()); + fprintf(fp, "%ld\n", poly[i].size()); for ( int j = 0; j < (int)poly[i].size(); ++j ) { fprintf(fp, "%.6f %.6f\n", poly[i][j].x(), poly[i][j].y()); } diff --git a/src/Lib/Polygon/polygon.hxx b/src/Lib/Polygon/polygon.hxx index 70498f6f..c672bdb5 100644 --- a/src/Lib/Polygon/polygon.hxx +++ b/src/Lib/Polygon/polygon.hxx @@ -55,43 +55,21 @@ class TGPolygon; * when turned on */ -#define CLIP_NATIVE 0 - -#ifdef CLIP_GPC extern "C" { #include } -#if CLIP_NATIVE // optimization apparently causing errors -typedef gpc_polygon ClipPolyType; -#else -typedef TGPolygon ClipPolyType; -#endif - -#endif /* CLIP_GPC */ - -#ifdef CLIP_CLIPPER #include "clipper.hpp" using namespace ClipperLib; -#if CLIP_NATIVE // optimization apparently causing errors -typedef Polygons ClipPolyType; -#else -typedef TGPolygon ClipPolyType; -#endif - -#endif /* CLIP_CLIPPER */ - - - #define FG_MAX_VERTICES 1500000 +typedef TGPolygon ClipPolyType; typedef std::vector < point_list > polytype; typedef polytype::iterator polytype_iterator; typedef polytype::const_iterator const_polytype_iterator; - class TGPolygon { private: diff --git a/src/Lib/TriangleJRS/triangle.c b/src/Lib/TriangleJRS/triangle.c index 000f5c4f..49786219 100644 --- a/src/Lib/TriangleJRS/triangle.c +++ b/src/Lib/TriangleJRS/triangle.c @@ -12945,7 +12945,7 @@ void statistics() #ifdef TRILIBRARY -void triangulate(triswitches, in, out, vorout) +int triangulate(triswitches, in, out, vorout) char *triswitches; struct triangulateio *in; struct triangulateio *out; @@ -13261,7 +13261,6 @@ char **argv; #endif /* not REDUCED */ triangledeinit(); -#ifndef TRILIBRARY + return 0; -#endif /* not TRILIBRARY */ } diff --git a/src/Lib/TriangleJRS/triangle.h b/src/Lib/TriangleJRS/triangle.h index 1d28ca02..b034113f 100644 --- a/src/Lib/TriangleJRS/triangle.h +++ b/src/Lib/TriangleJRS/triangle.h @@ -286,10 +286,10 @@ struct triangulateio { }; #ifdef ANSI_DECLARATORS -void triangulate(char *, struct triangulateio *, struct triangulateio *, +int triangulate(char *, struct triangulateio *, struct triangulateio *, struct triangulateio *); #else /* not ANSI_DECLARATORS */ -void triangulate(); +int triangulate(); #endif /* not ANSI_DECLARATORS */ diff --git a/src/Prep/Photo/photo.cxx b/src/Prep/Photo/photo.cxx index a70e588b..10fd98b6 100644 --- a/src/Prep/Photo/photo.cxx +++ b/src/Prep/Photo/photo.cxx @@ -245,13 +245,13 @@ int main( int argc, char **argv ) { geod = SGGeod::fromDegM( geod_nodes[i].x(), geod_nodes[i].y(), geod_nodes[i].z() ); SGVec3d cart = SGVec3d::fromGeod(geod); cout << cart << endl; - wgs84_nodes.push_back( cart ); + wgs84_nodes.push_back( cart ); } // bounding sphere SGBucket b( (x0 + x2) / 2, (y0 + y2) / 2 ); SGSphered d; - for ( i = 0; i < wgs84_nodes.size(); ++i ) { + for ( i = 0; i < (int)wgs84_nodes.size(); ++i ) { d.expandBy(wgs84_nodes[ i ]); }