mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-10-21 15:40:28 +00:00
LibCore: Remove unused TCPServer constructor parameter
This commit is contained in:
parent
d13884e933
commit
036aa43a41
Notes:
github-actions[bot]
2025-08-11 14:58:02 +00:00
Author: https://github.com/awesomekling
Commit: 036aa43a41
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/5817
Reviewed-by: https://github.com/gmta ✅
3 changed files with 10 additions and 12 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
namespace Core {
|
||||
|
||||
ErrorOr<NonnullRefPtr<TCPServer>> TCPServer::try_create(EventReceiver* parent)
|
||||
ErrorOr<NonnullRefPtr<TCPServer>> TCPServer::try_create()
|
||||
{
|
||||
int fd = TRY(Core::System::socket(AF_INET, SOCK_STREAM, 0));
|
||||
ArmedScopeGuard close_fd { [fd]() {
|
||||
|
@ -28,12 +28,11 @@ ErrorOr<NonnullRefPtr<TCPServer>> TCPServer::try_create(EventReceiver* parent)
|
|||
if (SetHandleInformation(to_handle(fd), HANDLE_FLAG_INHERIT, 0) == 0)
|
||||
return Error::from_windows_error();
|
||||
close_fd.disarm();
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) TCPServer(fd, parent));
|
||||
return adopt_nonnull_ref_or_enomem(new (nothrow) TCPServer(fd));
|
||||
}
|
||||
|
||||
TCPServer::TCPServer(int fd, EventReceiver* parent)
|
||||
: EventReceiver(parent)
|
||||
, m_fd(fd)
|
||||
TCPServer::TCPServer(int fd)
|
||||
: m_fd(fd)
|
||||
{
|
||||
VERIFY(m_fd >= 0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue