Skip to content

Commit

Permalink
libdeng2|OperatorRule: Added a static 3-way maximum method
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 27, 2013
1 parent 5f09a1f commit 7158ad7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doomsday/libdeng2/include/de/widgets/operatorrule.h
Expand Up @@ -57,6 +57,10 @@ class DENG2_PUBLIC OperatorRule : public Rule
return *refless(new OperatorRule(Maximum, left, right));
}

static OperatorRule &maximum(Rule const &a, Rule const &b, Rule const &c) {
return maximum(a, maximum(b, c));
}

static Rule const &maximum(Rule const &left, Rule const *rightOrNull) {
if(rightOrNull) return *refless(new OperatorRule(Maximum, left, *rightOrNull));
return left;
Expand Down

0 comments on commit 7158ad7

Please sign in to comment.