[GRASS-SVN] r56680 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Tue Jun 11 02:21:53 PDT 2013
Author: mmetz
Date: 2013-06-11 02:21:53 -0700 (Tue, 11 Jun 2013)
New Revision: 56680
Modified:
grass/trunk/lib/vector/Vlib/net.c
Log:
Vlib: Stephan Turek: fix node costs
Modified: grass/trunk/lib/vector/Vlib/net.c
===================================================================
--- grass/trunk/lib/vector/Vlib/net.c 2013-06-10 20:42:58 UTC (rev 56679)
+++ grass/trunk/lib/vector/Vlib/net.c 2013-06-11 09:21:53 UTC (rev 56680)
@@ -98,6 +98,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;
@@ -426,9 +427,9 @@
else {
cost = (dglInt32_t) Map->dgraph.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->dgraph.node_costs[i] = dcost;
}
db_close_database_shutdown_driver(driver);
More information about the grass-commit
mailing list