Skip to content

Commit

Permalink
don't take standard library functions by reference
Browse files Browse the repository at this point in the history
  • Loading branch information
TrentHouliston committed Sep 16, 2023
1 parent b3fabcc commit 789f14d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/util/network/resolve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ namespace util {
throw std::runtime_error("Unable to find an address for " + address + ":" + std::to_string(port));
}

std::unique_ptr<addrinfo, void (*)(addrinfo*)> servinfo(servinfo_ptr, ::freeaddrinfo);
std::unique_ptr<addrinfo, void (*)(addrinfo*)> servinfo(servinfo_ptr,
[](addrinfo* ptr) { ::freeaddrinfo(ptr); });

// Empty sock_t struct
NUClear::util::network::sock_t target{};
Expand Down

0 comments on commit 789f14d

Please sign in to comment.