summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <ram@ram.(none)>2002-08-22 12:21:58 +0500
committerunknown <ram@ram.(none)>2002-08-22 12:21:58 +0500
commitd1a7eea83e474cc83f1754ca19602dc8b483ae5b (patch)
treefe6e5cc8c22789f784617153179133d28bfbf2ef /sql
parent08a32ab1b12ec34bdf8f0e5da3bdffb6423884a2 (diff)
downloadmariadb-git-d1a7eea83e474cc83f1754ca19602dc8b483ae5b.tar.gz
Spatial code cleanup
Diffstat (limited to 'sql')
-rw-r--r--sql/spatial.cc11
-rw-r--r--sql/spatial.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index bb6e03c3c03..b21d30e4b53 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -285,7 +285,7 @@ int GLineString::get_mbr(MBR *mbr) const
return 1;
for (; n_points>0; --n_points)
{
- mbr->add_xy((double *)data, (double *)(data + 8));
+ mbr->add_xy(data, data + 8);
data += 8+8;
}
@@ -551,7 +551,7 @@ int GPolygon::get_mbr(MBR *mbr) const
return 1;
for (; n_points>0; --n_points)
{
- mbr->add_xy((double *)data, (double *)(data + 8));
+ mbr->add_xy(data, data + 8);
data += 8+8;
}
}
@@ -838,8 +838,7 @@ int GMultiPoint::get_mbr(MBR *mbr) const
return 1;
for (; n_points>0; --n_points)
{
- mbr->add_xy((double *)(data + WKB_HEADER_SIZE),
- (double *)(data + 8 + WKB_HEADER_SIZE));
+ mbr->add_xy(data + WKB_HEADER_SIZE, data + 8 + WKB_HEADER_SIZE);
data += (8+8+WKB_HEADER_SIZE);
}
return 0;
@@ -963,7 +962,7 @@ int GMultiLineString::get_mbr(MBR *mbr) const
for (; n_points>0; --n_points)
{
- mbr->add_xy((double *)data, (double *)(data + 8));
+ mbr->add_xy(data, data + 8);
data += 8+8;
}
}
@@ -1156,7 +1155,7 @@ int GMultiPolygon::get_mbr(MBR *mbr) const
for (; n_points>0; --n_points)
{
- mbr->add_xy((double *)data, (double *)(data + 8));
+ mbr->add_xy(data, data + 8);
data += 8+8;
}
}
diff --git a/sql/spatial.h b/sql/spatial.h
index 2daa8e856c9..c6e30a44fbf 100644
--- a/sql/spatial.h
+++ b/sql/spatial.h
@@ -71,7 +71,7 @@ struct MBR
}
}
- void add_xy(double *px, double *py)
+ void add_xy(const char *px, const char *py)
{ /* Not using "else" for proper one point MBR calculation */
double x, y;
float8get(x, px);