Fix compiler warnings by replacing x&&y||z with (x&&y)||z

This commit is contained in:
Alexander A. Klimov 2023-03-24 15:38:50 +01:00
parent 6d885a4f3f
commit 4019ad5bb7

View File

@ -54,7 +54,7 @@ void Connect(Socket& socket, const String& node, const String& service)
} catch (const std::exception& ex) {
auto se (dynamic_cast<const boost::system::system_error*>(&ex));
if (se && se->code() == boost::asio::error::operation_aborted || ++current == result.end()) {
if ((se && se->code() == boost::asio::error::operation_aborted) || ++current == result.end()) {
throw;
}
@ -84,7 +84,7 @@ void Connect(Socket& socket, const String& node, const String& service, boost::a
} catch (const std::exception& ex) {
auto se (dynamic_cast<const boost::system::system_error*>(&ex));
if (se && se->code() == boost::asio::error::operation_aborted || ++current == result.end()) {
if ((se && se->code() == boost::asio::error::operation_aborted) || ++current == result.end()) {
throw;
}