Commit e3d37dd4 authored by Paul Ramsey's avatar Paul Ramsey

Move datum declaration closer to use


git-svn-id: http://svn.osgeo.org/postgis/trunk@17303 b70326c6-7e19-0410-871a-916f4a2858ee
parent d7dfba42
Pipeline #50959568 passed with stage
in 22 minutes and 51 seconds
......@@ -841,12 +841,7 @@ Datum geography_bestsrid(PG_FUNCTION_ARGS)
int empty2 = LW_FALSE;
double xwidth, ywidth;
POINT2D center;
Datum d1 = PG_GETARG_DATUM(0);
Datum d2;
if (PG_NARGS() > 1)
d2 = PG_GETARG_DATUM(1);
/* Get our geometry objects loaded into memory. */
g1 = (GSERIALIZED*)PG_DETOAST_DATUM(d1);
......@@ -863,6 +858,7 @@ Datum geography_bestsrid(PG_FUNCTION_ARGS)
/* If we have a unique second argument, fill in all the necessary variables. */
if (PG_NARGS() > 1)
{
Datum d2 = PG_GETARG_DATUM(1);
g2 = (GSERIALIZED*)PG_DETOAST_DATUM(d2);
gbox2.flags = g2->flags;
empty2 = gserialized_is_empty(g2);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment