[GRASS-SVN] r56682 - grass/branches/develbranch_6/lib/vector/Vlib

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 11 02:25:22 PDT 2013


Author: mmetz
Date: 2013-06-11 02:25:22 -0700 (Tue, 11 Jun 2013)
New Revision: 56682

Modified:
   grass/branches/develbranch_6/lib/vector/Vlib/net.c
Log:
Vlib: Stephan Turek: fix node costs

Modified: grass/branches/develbranch_6/lib/vector/Vlib/net.c
===================================================================
--- grass/branches/develbranch_6/lib/vector/Vlib/net.c	2013-06-11 09:24:55 UTC (rev 56681)
+++ grass/branches/develbranch_6/lib/vector/Vlib/net.c	2013-06-11 09:25:22 UTC (rev 56682)
@@ -103,6 +103,7 @@
     double dcost, bdcost, ll;
     int cost, bcost;
     dglGraph_s *gr;
+    dglInt32_t dgl_cost;
     dglInt32_t opaqueset[16] =
 	{ 360000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
     struct field_info *Fi;
@@ -417,9 +418,9 @@
 	    else {
 		cost = (dglInt32_t) Map->cost_multip * dcost;
 	    }
+	    dgl_cost = cost;
 	    G_debug(3, "Set node's cost to %d", cost);
-	    dglNodeSet_Attr(gr, dglGetNode(gr, (dglInt32_t) i),
-			    (dglInt32_t *) (dglInt32_t) & cost);
+	    dglNodeSet_Attr(gr, dglGetNode(gr, (dglInt32_t) i), &dgl_cost);
 	    Map->node_costs[i] = dcost;
 	}
 	db_close_database_shutdown_driver(driver);



More information about the grass-commit mailing list