Skip to content

Commit 4748cb6

Browse files
authored
Merge pull request #6505 from ntrel/cond-parens
Use parens for conditional operator assignment
2 parents 7ab0e8c + 6a12812 commit 4748cb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

std/numeric.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1550,14 +1550,14 @@ do
15501550
// update a, b, v, w, and x
15511551
if (fu <= fx)
15521552
{
1553-
u < x ? b : a = x;
1553+
(u < x ? b : a) = x;
15541554
v = w; fv = fw;
15551555
w = x; fw = fx;
15561556
x = u; fx = fu;
15571557
}
15581558
else
15591559
{
1560-
u < x ? a : b = u;
1560+
(u < x ? a : b) = u;
15611561
if (fu <= fw || w == x)
15621562
{
15631563
v = w; fv = fw;

0 commit comments

Comments
 (0)