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