Skip to content

Commit

Permalink
Who let this obvious bug through!
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Sep 15, 2023
1 parent 8a5200f commit 8fa71c4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tests/test_util/has_ipv6.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ namespace test_util {

bool has_ipv6() {
// See if any interface has an ipv6 address
return std::any_of(NUClear::util::network::get_interfaces().begin(),
NUClear::util::network::get_interfaces().end(),
[](const auto& iface) { return iface.ip.sock.sa_family == AF_INET6; });
auto ifaces = NUClear::util::network::get_interfaces();
return std::any_of(ifaces.begin(), ifaces.end(), [](const auto& iface) {
return iface.ip.sock.sa_family == AF_INET6;
});
}

} // namespace test_util

0 comments on commit 8fa71c4

Please sign in to comment.