Changeset: d75331cb7ef6 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d75331cb7ef6
Modified Files:
geom/monetdb5/geom.c
geom/monetdb5/geomBulk.c
Branch: sfcgal
Log Message:
Bunfirst is gone
diffs (70 lines):
diff --git a/geom/monetdb5/geom.c b/geom/monetdb5/geom.c
--- a/geom/monetdb5/geom.c
+++ b/geom/monetdb5/geom.c
@@ -4888,8 +4888,8 @@ wkbUnionCascade(wkb **outWKB, bat *inBAT
throw(MAL, "geom.Union", "GDKmalloc failed");
}
- for (j = 0, i = BUNfirst(inBAT); i < BATcount(inBAT); i++, j++) {
- geoms[j] = (wkb *) BUNtail(inBAT_iter, i + BUNfirst(inBAT));
+ for (j = 0, i = 0; i < BATcount(inBAT); i++, j++) {
+ geoms[j] = (wkb *) BUNtail(inBAT_iter, i);
}
if ((err = wkbUnaryUnion(outWKB, geoms, j)) != MAL_SUCCEED) {
@@ -5129,8 +5129,8 @@ wkbCollectCascade(wkb **outWKB, bat *inB
throw(MAL, "geom.Collect", "GDKmalloc failed");
}
- for (j = 0, i = BUNfirst(inBAT); i < BATcount(inBAT); i++, j++) {
- geoms[j] = (wkb *) BUNtail(inBAT_iter, i + BUNfirst(inBAT));
+ for (j = 0, i = 0; i < BATcount(inBAT); i++, j++) {
+ geoms[j] = (wkb *) BUNtail(inBAT_iter, i);
}
if ((err = wkbUnaryCollect(outWKB, geoms, j)) != MAL_SUCCEED) {
@@ -5183,7 +5183,7 @@ BATgroupWKBWKBtoWKB(bat *outBAT_id, BAT
if (BATtdense(g))
gids = NULL;
else
- gids = (const oid *) Tloc(g, BUNfirst(g) + start);
+ gids = (const oid *) Tloc(g, start);
/*Allocate structures*/
if ((aWKBs = (wkb **) GDKzalloc(sizeof(wkb*)*ngrp)) == NULL) {
diff --git a/geom/monetdb5/geomBulk.c b/geom/monetdb5/geomBulk.c
--- a/geom/monetdb5/geomBulk.c
+++ b/geom/monetdb5/geomBulk.c
@@ -2427,12 +2427,12 @@ wkbIntersection_bat(bat *outBAT_id, bat
aBAT_iter = bat_iterator(aBAT);
bBAT_iter = bat_iterator(bBAT);
- for (i = BUNfirst(aBAT); i < BATcount(aBAT); i++) {
+ for (i = 0; i < BATcount(aBAT); i++) {
str err = NULL;
wkb *aWKB = NULL, *bWKB = NULL, *outWKB = NULL;
- aWKB = (wkb *) BUNtail(aBAT_iter, i + BUNfirst(aBAT));
- bWKB = (wkb *) BUNtail(bBAT_iter, i + BUNfirst(bBAT));
+ aWKB = (wkb *) BUNtail(aBAT_iter, i);
+ bWKB = (wkb *) BUNtail(bBAT_iter, i);
if ((err = wkbIntersection(&outWKB, &aWKB, &bWKB)) !=
MAL_SUCCEED) { //set SRID
BBPunfix(aBAT->batCacheid);
@@ -2513,13 +2513,13 @@ wkbIntersection_bat_s(bat *outBAT_id, ba
saBAT_iter = bat_iterator(saBAT);
sbBAT_iter = bat_iterator(sbBAT);
- for (i = BUNfirst(saBAT); i < BATcount(saBAT); i++) {
+ for (i = 0; i < BATcount(saBAT); i++) {
str err = NULL;
oid aOID = 0, bOID = 0;
wkb *aWKB = NULL, *bWKB = NULL, *outWKB = NULL;
- aOID = *(oid *) BUNtail(saBAT_iter, i + BUNfirst(saBAT));
- bOID = *(oid *) BUNtail(sbBAT_iter, i + BUNfirst(sbBAT));
+ aOID = *(oid *) BUNtail(saBAT_iter, i);
+ bOID = *(oid *) BUNtail(sbBAT_iter, i);
aWKB = (wkb *) BUNtail(aBAT_iter, aOID);
bWKB = (wkb *) BUNtail(bBAT_iter, bOID);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list