summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.76.0/tests/expected/d/40080-static_if.d
blob: 0eb3a1a81c3de4b25b438ad83ce3cf8f079cbf8c (plain)
1
2
3
4
5
6
7
8
9
10
11
ClLinearExpression opBinary(string op) (double constant)
{
    static if (op == "+")
        return new ClLinearExpression(this, 1, constant);
    else static if (op == "-")
        return new ClLinearExpression(this, 1, -constant);
    else static if (op == "*")
        return new ClLinearExpression(this, constant, 0);
    else static if (op == "/")
        return new ClLinearExpression(this, 1.0 / constant, 0);
}