Skip to content

Commit ca32b96

Browse files
committed
C++11-compliant fix for Windows
1 parent 36b4fa7 commit ca32b96

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

inst/include/cpp4r/r_bool.hpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,8 @@ class r_bool {
5151
static constexpr int na = std::numeric_limits<int>::min();
5252

5353
static constexpr int from_int(int value) noexcept {
54-
if (value == static_cast<int>(FALSE)) return FALSE;
55-
if (value == static_cast<int>(na)) return na;
56-
return TRUE;
54+
return (value == static_cast<int>(FALSE)) ? FALSE :
55+
(value == static_cast<int>(na)) ? na : TRUE;
5756
}
5857

5958
int value_ = na;

0 commit comments

Comments
 (0)