]> git.saurik.com Git - wxWidgets.git/commitdiff
Use delete foo; instead of GSocket_destroy(foo);
authorDavid Elliott <dfe@tgwbd.org>
Fri, 6 Aug 2004 22:28:19 +0000 (22:28 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Fri, 6 Aug 2004 22:28:19 +0000 (22:28 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28682 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/gsocket.cpp
src/unix/gsocket.cpp

index 4a1101840d8fd1951c62dda68d824936b7f6f5ee..93c654e2c4f010aa9a554eb4567c35311fee117d 100644 (file)
@@ -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;
   }
index 81c6a62fad8f6113b2ae46536be63c81aa850172..a6d0aa07b5509e91a2308207cf2488a4407b5012 100644 (file)
@@ -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;
   }