diff options
author | Alvaro Herrera | 2020-01-30 16:42:14 +0000 |
---|---|---|
committer | Alvaro Herrera | 2020-01-30 16:42:14 +0000 |
commit | c9d29775195922136c09cc980bb1b7091bf3d859 (patch) | |
tree | 2a7ffae1890975a24c18aa92f6dfe5307051492a /contrib/cube/cube.c | |
parent | 4e89c79a52f8a898edd648b56a00f0f4f840cfe7 (diff) |
Clean up newlines following left parentheses
We used to strategically place newlines after some function call left
parentheses to make pgindent move the argument list a few chars to the
left, so that the whole line would fit under 80 chars. However,
pgindent no longer does that, so the newlines just made the code
vertically longer for no reason. Remove those newlines, and reflow some
of those lines for some extra naturality.
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'contrib/cube/cube.c')
-rw-r--r-- | contrib/cube/cube.c | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c index b98118e367b..6f810b26c5d 100644 --- a/contrib/cube/cube.c +++ b/contrib/cube/cube.c @@ -717,14 +717,10 @@ cube_union_v0(NDBOX *a, NDBOX *b) /* First compute the union of the dimensions present in both args */ for (i = 0; i < DIM(b); i++) { - result->x[i] = Min( - Min(LL_COORD(a, i), UR_COORD(a, i)), - Min(LL_COORD(b, i), UR_COORD(b, i)) - ); - result->x[i + DIM(a)] = Max( - Max(LL_COORD(a, i), UR_COORD(a, i)), - Max(LL_COORD(b, i), UR_COORD(b, i)) - ); + result->x[i] = Min(Min(LL_COORD(a, i), UR_COORD(a, i)), + Min(LL_COORD(b, i), UR_COORD(b, i))); + result->x[i + DIM(a)] = Max(Max(LL_COORD(a, i), UR_COORD(a, i)), + Max(LL_COORD(b, i), UR_COORD(b, i))); } /* continue on the higher dimensions only present in 'a' */ for (; i < DIM(a); i++) @@ -796,14 +792,10 @@ cube_inter(PG_FUNCTION_ARGS) /* First compute intersection of the dimensions present in both args */ for (i = 0; i < DIM(b); i++) { - result->x[i] = Max( - Min(LL_COORD(a, i), UR_COORD(a, i)), - Min(LL_COORD(b, i), UR_COORD(b, i)) - ); - result->x[i + DIM(a)] = Min( - Max(LL_COORD(a, i), UR_COORD(a, i)), - Max(LL_COORD(b, i), UR_COORD(b, i)) - ); + result->x[i] = Max(Min(LL_COORD(a, i), UR_COORD(a, i)), + Min(LL_COORD(b, i), UR_COORD(b, i))); + result->x[i + DIM(a)] = Min(Max(LL_COORD(a, i), UR_COORD(a, i)), + Max(LL_COORD(b, i), UR_COORD(b, i))); } /* continue on the higher dimensions only present in 'a' */ for (; i < DIM(a); i++) |