[GRASS-SVN] r53353 - in grass/trunk: include/defs include/vect lib/vector/Vlib lib/vector/diglib
svn_grass at osgeo.org
svn_grass at osgeo.org
Wed Oct 10 10:20:31 PDT 2012
Author: mmetz
Date: 2012-10-10 10:20:31 -0700 (Wed, 10 Oct 2012)
New Revision: 53353
Modified:
grass/trunk/include/defs/vector.h
grass/trunk/include/vect/dig_externs.h
grass/trunk/lib/vector/Vlib/list.c
grass/trunk/lib/vector/Vlib/sindex.c
grass/trunk/lib/vector/diglib/list.c
grass/trunk/lib/vector/diglib/spindex.c
Log:
change boxlist_add args
Modified: grass/trunk/include/defs/vector.h
===================================================================
--- grass/trunk/include/defs/vector.h 2012-10-10 15:37:13 UTC (rev 53352)
+++ grass/trunk/include/defs/vector.h 2012-10-10 17:20:31 UTC (rev 53353)
@@ -119,7 +119,7 @@
/* List of bounding boxes with ids */
struct boxlist *Vect_new_boxlist(int);
-int Vect_boxlist_append(struct boxlist *, int, struct bound_box);
+int Vect_boxlist_append(struct boxlist *, int, const struct bound_box *);
int Vect_boxlist_append_boxlist(struct boxlist *, const struct boxlist *);
int Vect_boxlist_delete(struct boxlist *, int);
int Vect_boxlist_delete_boxlist(struct boxlist *, const struct boxlist *);
Modified: grass/trunk/include/vect/dig_externs.h
===================================================================
--- grass/trunk/include/vect/dig_externs.h 2012-10-10 15:37:13 UTC (rev 53352)
+++ grass/trunk/include/vect/dig_externs.h 2012-10-10 17:20:31 UTC (rev 53353)
@@ -90,7 +90,7 @@
/* list.c */
int dig_init_boxlist(struct boxlist *, int);
-int dig_boxlist_add(struct boxlist *, int, struct bound_box);
+int dig_boxlist_add(struct boxlist *, int, const struct bound_box *);
/* plus.c */
int dig_init_plus(struct Plus_head *);
Modified: grass/trunk/lib/vector/Vlib/list.c
===================================================================
--- grass/trunk/lib/vector/Vlib/list.c 2012-10-10 15:37:13 UTC (rev 53352)
+++ grass/trunk/lib/vector/Vlib/list.c 2012-10-10 17:20:31 UTC (rev 53353)
@@ -285,7 +285,7 @@
* \return 0 on success
* \return 1 on error
*/
-int Vect_boxlist_append(struct boxlist *list, int id, struct bound_box box)
+int Vect_boxlist_append(struct boxlist *list, int id, const struct bound_box *box)
{
int i;
size_t size;
@@ -312,7 +312,7 @@
list->id[list->n_values] = id;
if (list->have_boxes)
- list->box[list->n_values] = box;
+ list->box[list->n_values] = *box;
list->n_values++;
return 0;
@@ -336,14 +336,14 @@
if (blist->have_boxes) {
for (i = 0; i < blist->n_values; i++)
- Vect_boxlist_append(alist, blist->id[i], blist->box[i]);
+ Vect_boxlist_append(alist, blist->id[i], &blist->box[i]);
}
else {
struct bound_box box;
box.E = box.W = box.N = box.S = box.T = box.B = 0;
for (i = 0; i < blist->n_values; i++)
- Vect_boxlist_append(alist, blist->id[i], box);
+ Vect_boxlist_append(alist, blist->id[i], &box);
}
return 0;
Modified: grass/trunk/lib/vector/Vlib/sindex.c
===================================================================
--- grass/trunk/lib/vector/Vlib/sindex.c 2012-10-10 15:37:13 UTC (rev 53352)
+++ grass/trunk/lib/vector/Vlib/sindex.c 2012-10-10 17:20:31 UTC (rev 53353)
@@ -61,7 +61,7 @@
Line = plus->Line[line];
if (!(Line->type & type))
continue;
- dig_boxlist_add(list, line, LocList->box[i]);
+ dig_boxlist_add(list, line, &LocList->box[i]);
}
G_debug(3, " %d lines of requested type", list->n_values);
Modified: grass/trunk/lib/vector/diglib/list.c
===================================================================
--- grass/trunk/lib/vector/diglib/list.c 2012-10-10 15:37:13 UTC (rev 53352)
+++ grass/trunk/lib/vector/diglib/list.c 2012-10-10 17:20:31 UTC (rev 53353)
@@ -31,7 +31,7 @@
}
/* Add item to box list, does not check for duplicates */
-int dig_boxlist_add(struct boxlist *list, int id, struct bound_box box)
+int dig_boxlist_add(struct boxlist *list, int id, const struct bound_box *box)
{
if (list->n_values == list->alloc_values) {
size_t size = (list->n_values + 1000) * sizeof(int);
@@ -55,7 +55,7 @@
list->id[list->n_values] = id;
if (list->have_boxes)
- list->box[list->n_values] = box;
+ list->box[list->n_values] = *box;
list->n_values++;
return 1;
Modified: grass/trunk/lib/vector/diglib/spindex.c
===================================================================
--- grass/trunk/lib/vector/diglib/spindex.c 2012-10-10 15:37:13 UTC (rev 53352)
+++ grass/trunk/lib/vector/diglib/spindex.c 2012-10-10 17:20:31 UTC (rev 53353)
@@ -590,7 +590,7 @@
box.N = rect->boundary[4];
box.T = rect->boundary[5];
- dig_boxlist_add(list, id, box);
+ dig_boxlist_add(list, id, &box);
return 1;
}
More information about the grass-commit
mailing list