Browse Source

LibCore: remove redundant UDPSocket constructor

The comment claims it is for use from UDPServer::accept
Which is not a real function.
Muhammad Zahalqa 5 năm trước cách đây
mục cha
commit
de5e542930
2 tập tin đã thay đổi với 0 bổ sung11 xóa
  1. 0 10
      Libraries/LibCore/UDPSocket.cpp
  2. 0 1
      Libraries/LibCore/UDPSocket.h

+ 0 - 10
Libraries/LibCore/UDPSocket.cpp

@@ -34,16 +34,6 @@
 
 namespace Core {
 
-UDPSocket::UDPSocket(int fd, Object* parent)
-    : Socket(Socket::Type::UDP, parent)
-{
-    // NOTE: This constructor is used by UDPServer::accept(), so the socket is already connected.
-    m_connected = true;
-    set_fd(fd);
-    set_mode(IODevice::ReadWrite);
-    set_error(0);
-}
-
 UDPSocket::UDPSocket(Object* parent)
     : Socket(Socket::Type::UDP, parent)
 {

+ 0 - 1
Libraries/LibCore/UDPSocket.h

@@ -36,7 +36,6 @@ public:
     virtual ~UDPSocket() override;
 
 private:
-    UDPSocket(int fd, Object* parent = nullptr);
     explicit UDPSocket(Object* parent = nullptr);
 };