summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.75.0/tests/input/d/static_if.d
blob: 24e6eabab9be87e868064873dff902b7bbcb13c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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);
    }