Skip to content

Commit 630359d

Browse files
Adding parentheses to avoid problems of operator precedence
1 parent 613175d commit 630359d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

OptionParser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ using std::to_string;
8282
template<class T> string
8383
format_int_like(T &val) {
8484
return "[" +
85-
(val == numeric_limits<T>::max()) ? "infty" :
86-
((val == -numeric_limits<T>::max()) ? "-infty" : to_string(val)) + "]";
85+
((val == numeric_limits<T>::max()) ? "infty" :
86+
((val == -numeric_limits<T>::max()) ? "-infty" : to_string(val))) + "]";
8787
}
8888

8989
template<class T> string

0 commit comments

Comments
 (0)