Reformat code + small fixes

This commit is contained in:
momo5502
2025-01-06 09:32:57 +01:00
parent c5238e110b
commit fdb0fafa56
39 changed files with 2581 additions and 2419 deletions

View File

@@ -339,7 +339,7 @@ namespace network
addrinfo* result = nullptr;
if (!getaddrinfo(hostname.data(), nullptr, nullptr, &result))
{
const auto _2 = utils::finally([&result]()
const auto _2 = utils::finally([&result]
{
freeaddrinfo(result);
});

View File

@@ -69,8 +69,8 @@ namespace network
bool socket::send(const address& target, const void* data, const size_t size) const
{
const auto res = sendto(this->socket_, static_cast<const char*>(data), static_cast<send_size>(size), 0,
&target.get_addr(),
target.get_size());
&target.get_addr(),
target.get_size());
return static_cast<size_t>(res) == size;
}