Commit 4ec90f53 authored by Alexander Korotkov's avatar Alexander Korotkov

Minor formatting cleanup for 2a636834

parent 0f645958
...@@ -317,16 +317,14 @@ spg_kd_inner_consistent(PG_FUNCTION_ARGS) ...@@ -317,16 +317,14 @@ spg_kd_inner_consistent(PG_FUNCTION_ARGS)
if (in->norderbys > 0) if (in->norderbys > 0)
{ {
MemoryContext oldCtx = MemoryContextSwitchTo( MemoryContext oldCtx = MemoryContextSwitchTo(in->traversalMemoryContext);
in->traversalMemoryContext);
BOX *box = box_copy(&bboxes[i - 1]); BOX *box = box_copy(&bboxes[i - 1]);
MemoryContextSwitchTo(oldCtx); MemoryContextSwitchTo(oldCtx);
out->traversalValues[out->nNodes] = box; out->traversalValues[out->nNodes] = box;
out->distances[out->nNodes] = spg_key_orderbys_distances( out->distances[out->nNodes] = spg_key_orderbys_distances(BoxPGetDatum(box), false,
BoxPGetDatum(box), false,
in->orderbys, in->norderbys); in->orderbys, in->norderbys);
} }
......
...@@ -278,8 +278,7 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS) ...@@ -278,8 +278,7 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
if (in->norderbys > 0) if (in->norderbys > 0)
{ {
MemoryContext oldCtx = MemoryContextSwitchTo( MemoryContext oldCtx = MemoryContextSwitchTo(in->traversalMemoryContext);
in->traversalMemoryContext);
/* Use parent quadrant box as traversalValue */ /* Use parent quadrant box as traversalValue */
BOX *quadrant = box_copy(bbox); BOX *quadrant = box_copy(bbox);
...@@ -287,8 +286,7 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS) ...@@ -287,8 +286,7 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
MemoryContextSwitchTo(oldCtx); MemoryContextSwitchTo(oldCtx);
out->traversalValues[i] = quadrant; out->traversalValues[i] = quadrant;
out->distances[i] = spg_key_orderbys_distances( out->distances[i] = spg_key_orderbys_distances(BoxPGetDatum(quadrant), false,
BoxPGetDatum(quadrant), false,
in->orderbys, in->norderbys); in->orderbys, in->norderbys);
} }
} }
...@@ -385,16 +383,14 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS) ...@@ -385,16 +383,14 @@ spg_quad_inner_consistent(PG_FUNCTION_ARGS)
if (in->norderbys > 0) if (in->norderbys > 0)
{ {
MemoryContext oldCtx = MemoryContextSwitchTo( MemoryContext oldCtx = MemoryContextSwitchTo(in->traversalMemoryContext);
in->traversalMemoryContext);
BOX *quadrant = getQuadrantArea(bbox, centroid, i); BOX *quadrant = getQuadrantArea(bbox, centroid, i);
MemoryContextSwitchTo(oldCtx); MemoryContextSwitchTo(oldCtx);
out->traversalValues[out->nNodes] = quadrant; out->traversalValues[out->nNodes] = quadrant;
out->distances[out->nNodes] = spg_key_orderbys_distances( out->distances[out->nNodes] = spg_key_orderbys_distances(BoxPGetDatum(quadrant), false,
BoxPGetDatum(quadrant), false,
in->orderbys, in->norderbys); in->orderbys, in->norderbys);
} }
......
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