summaryrefslogtreecommitdiff
path: root/sql/spatial.cc
diff options
context:
space:
mode:
authormonty@narttu.mysql.fi <>2007-01-27 03:46:45 +0200
committermonty@narttu.mysql.fi <>2007-01-27 03:46:45 +0200
commit8a80e36ac3facdfba626fd758b6e4490d3ea9ddf (patch)
tree7a54aa50f6bf549d049cd400fe056d244cfc7eb8 /sql/spatial.cc
parentc022454e7c5690330ed78664443e65b3511649b8 (diff)
parent120e3f5ee1a5f2d62f6a4ff10db0797c5ac42287 (diff)
downloadmariadb-git-8a80e36ac3facdfba626fd758b6e4490d3ea9ddf.tar.gz
Merge mysql.com:/home/my/mysql-5.0
into mysql.com:/home/my/mysql-5.1 Merge of 'remove compiler warnings when using -Wshadow'
Diffstat (limited to 'sql/spatial.cc')
-rw-r--r--sql/spatial.cc24
1 files changed, 12 insertions, 12 deletions
diff --git a/sql/spatial.cc b/sql/spatial.cc
index 22df69a978b..62d0c7310e5 100644
--- a/sql/spatial.cc
+++ b/sql/spatial.cc
@@ -23,13 +23,13 @@
String Geometry::bad_geometry_data("Bad object", &my_charset_bin);
-Geometry::Class_info *Geometry::ci_collection[Geometry::wkb_end+1]=
+Geometry::Class_info *Geometry::ci_collection[Geometry::wkb_last+1]=
{
NULL, NULL, NULL, NULL, NULL, NULL, NULL
};
static Geometry::Class_info **ci_collection_end=
- Geometry::ci_collection+Geometry::wkb_end + 1;
+ Geometry::ci_collection+Geometry::wkb_last + 1;
Geometry::Class_info::Class_info(const char *name, int type_id,
void(*create_func)(void *)):
@@ -552,7 +552,7 @@ bool Gis_line_string::get_mbr(MBR *mbr, const char **end) const
}
-int Gis_line_string::length(double *len) const
+int Gis_line_string::geom_length(double *len) const
{
uint32 n_points;
double prev_x, prev_y;
@@ -947,14 +947,14 @@ int Gis_polygon::centroid_xy(double *x, double *y) const
while (--n_points) // One point is already read
{
- double x, y;
- get_point(&x, &y, data);
+ double tmp_x, tmp_y;
+ get_point(&tmp_x, &tmp_y, data);
data+= (SIZEOF_STORED_DOUBLE*2);
- cur_area+= (prev_x + x) * (prev_y - y);
- cur_cx+= x;
- cur_cy+= y;
- prev_x= x;
- prev_y= y;
+ cur_area+= (prev_x + tmp_x) * (prev_y - tmp_y);
+ cur_cx+= tmp_x;
+ cur_cy+= tmp_y;
+ prev_x= tmp_x;
+ prev_y= tmp_y;
}
cur_area= fabs(cur_area) / 2;
cur_cx= cur_cx / (org_n_points - 1);
@@ -1298,7 +1298,7 @@ int Gis_multi_line_string::geometry_n(uint32 num, String *result) const
}
-int Gis_multi_line_string::length(double *len) const
+int Gis_multi_line_string::geom_length(double *len) const
{
uint32 n_line_strings;
const char *data= m_data;
@@ -1315,7 +1315,7 @@ int Gis_multi_line_string::length(double *len) const
Gis_line_string ls;
data+= WKB_HEADER_SIZE;
ls.set_data_ptr(data, (uint32) (m_data_end - data));
- if (ls.length(&ls_len))
+ if (ls.geom_length(&ls_len))
return 1;
*len+= ls_len;
/*