From: David Elliott Date: Fri, 6 Aug 2004 22:28:19 +0000 (+0000) Subject: Use delete foo; instead of GSocket_destroy(foo); X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/85431efa68837f4990e9cc92afe6a77e3d5113a3 Use delete foo; instead of GSocket_destroy(foo); git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/gsocket.cpp b/src/msw/gsocket.cpp index 4a1101840d..93c654e2c4 100644 --- a/src/msw/gsocket.cpp +++ b/src/msw/gsocket.cpp @@ -466,7 +466,7 @@ GSocket *GSocket::WaitConnection() /* Wait for a connection (with timeout) */ if (Input_Timeout() == GSOCK_TIMEDOUT) { - GSocket_destroy(connection); + delete connection; /* m_error set by _GSocket_Input_Timeout */ return NULL; } @@ -480,7 +480,7 @@ GSocket *GSocket::WaitConnection() else m_error = GSOCK_IOERR; - GSocket_destroy(connection); + delete connection; return NULL; } @@ -492,7 +492,7 @@ GSocket *GSocket::WaitConnection() connection->m_peer = GAddress_new(); if (!connection->m_peer) { - GSocket_destroy(connection); + delete connection; m_error = GSOCK_MEMERR; return NULL; } @@ -500,7 +500,7 @@ GSocket *GSocket::WaitConnection() if (err != GSOCK_NOERROR) { GAddress_destroy(connection->m_peer); - GSocket_destroy(connection); + delete connection; m_error = err; return NULL; } diff --git a/src/unix/gsocket.cpp b/src/unix/gsocket.cpp index 81c6a62fad..a6d0aa07b5 100644 --- a/src/unix/gsocket.cpp +++ b/src/unix/gsocket.cpp @@ -542,7 +542,7 @@ GSocket *GSocket::WaitConnection() /* Wait for a connection (with timeout) */ if (Input_Timeout() == GSOCK_TIMEDOUT) { - GSocket_destroy(connection); + delete connection; /* m_error set by _GSocket_Input_Timeout */ return NULL; } @@ -556,7 +556,7 @@ GSocket *GSocket::WaitConnection() else m_error = GSOCK_IOERR; - GSocket_destroy(connection); + delete connection; return NULL; } @@ -568,7 +568,7 @@ GSocket *GSocket::WaitConnection() connection->m_peer = GAddress_new(); if (!connection->m_peer) { - GSocket_destroy(connection); + delete connection; m_error = GSOCK_MEMERR; return NULL; } @@ -576,7 +576,7 @@ GSocket *GSocket::WaitConnection() if (err != GSOCK_NOERROR) { GAddress_destroy(connection->m_peer); - GSocket_destroy(connection); + delete connection; m_error = err; return NULL; }