diff --git a/src/correction.cc b/src/correction.cc index a7d58ad..6bc3669 100644 --- a/src/correction.cc +++ b/src/correction.cc @@ -201,7 +201,7 @@ namespace { return edge.GetDouble(); } else if ( edge.IsString() ) { std::string_view str = edge.GetString(); - if (str == "inf" or str == "+inf") return std::numeric_limits::infinity(); + if ((str == "inf") || (str == "+inf")) return std::numeric_limits::infinity(); else if (str == "-inf") return -std::numeric_limits::infinity(); } throw std::runtime_error("Invalid edge type");