]> git.mxchange.org Git - flightgear.git/commitdiff
Let's not pass copies of huge structures on the stack ... ye might see a
authorcurt <curt>
Thu, 18 Mar 1999 04:31:10 +0000 (04:31 +0000)
committercurt <curt>
Thu, 18 Mar 1999 04:31:10 +0000 (04:31 +0000)
segfault ... :-)

Clipper/clipper.hxx
Triangulate/triangle.cxx
Triangulate/triangle.hxx

index 617b92f451bebaa5b0460cf0c085b89b5749c445..874d4948548479c20e98911e1dc4135ccc8e72bc 100644 (file)
@@ -54,6 +54,7 @@ FG_USING_STD(vector);
 
 typedef vector < gpc_polygon * > gpcpoly_container;
 typedef gpcpoly_container::iterator gpcpoly_iterator;
+typedef gpcpoly_container::const_iterator const_gpcpoly_iterator;
 
 
 #define FG_MAX_AREAS 20
@@ -108,6 +109,10 @@ public:
 
 
 // $Log$
+// Revision 1.4  1999/03/18 04:31:10  curt
+// Let's not pass copies of huge structures on the stack ... ye might see a
+// segfault ... :-)
+//
 // Revision 1.3  1999/03/17 23:48:59  curt
 // minor renaming and a bit of rearranging.
 //
index 2a226dd3b2777dacd7c6bcdf85e25a62f77ba037..992549214594da0a009283668101602cb7951f47 100644 (file)
@@ -36,13 +36,13 @@ FGTriangle::~FGTriangle( void ) {
 
 
 // populate this class based on the specified gpc_polys list
-int FGTriangle::build( FGgpcPolyList gpc_polys ) {
+int FGTriangle::build( const FGgpcPolyList& gpc_polys ) {
     // traverse the gpc_polys and build a unified node list and a set
     // of Triangle PSLG that reference the node list by index
     // (starting at zero)
 
     gpc_polygon *gpc_poly;
-    gpcpoly_iterator current, last;
+    const_gpcpoly_iterator current, last;
 
     // process polygons in priority order
     cout << "prepairing node list and polygons" << endl;
@@ -64,10 +64,16 @@ int FGTriangle::build( FGgpcPolyList gpc_polys ) {
            }
        }
     }
+
+    return 0;
 }
 
 
 // $Log$
+// Revision 1.2  1999/03/18 04:31:11  curt
+// Let's not pass copies of huge structures on the stack ... ye might see a
+// segfault ... :-)
+//
 // Revision 1.1  1999/03/17 23:51:59  curt
 // Initial revision.
 //
index 5879abd188a17821069568f42041d46f85833177..1dbb85e248f116a1843467c6c46333c2f8b1acf0 100644 (file)
@@ -66,7 +66,7 @@ public:
     ~FGTriangle( void );
 
     // populate this class based on the specified gpc_polys list
-    int build( FGgpcPolyList gpc_polys );
+    int build( const FGgpcPolyList& gpc_polys );
 };
 
 
@@ -74,6 +74,10 @@ public:
 
 
 // $Log$
+// Revision 1.2  1999/03/18 04:31:12  curt
+// Let's not pass copies of huge structures on the stack ... ye might see a
+// segfault ... :-)
+//
 // Revision 1.1  1999/03/17 23:51:59  curt
 // Initial revision.
 //