Use ternary notation
Merge pull request #2886 from elemoine/ternary

Use ternary notation