lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] master 98adf12 1/2: Use new(wx) in one more case


From: Greg Chicares
Subject: [lmi-commits] [lmi] master 98adf12 1/2: Use new(wx) in one more case
Date: Sun, 7 Feb 2021 18:41:19 -0500 (EST)

branch: master
commit 98adf12d53dc05029afdea728e374c2314566cf7
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Use new(wx) in one more case
    
    See:
      https://lists.nongnu.org/archive/html/lmi/2021-02/msg00012.html
---
 skeleton.cpp | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/skeleton.cpp b/skeleton.cpp
index 9820d1d..267582e 100644
--- a/skeleton.cpp
+++ b/skeleton.cpp
@@ -1081,11 +1081,7 @@ void 
Skeleton::UponTestFloatingPointEnvironment(wxCommandEvent&)
 
 void Skeleton::UponTestPasting(wxCommandEvent&)
 {
-    // This uses '::new' rather than 'new(wx)' because the object is
-    // explicitly deleted by calling Destroy(); yet the Destroy()
-    // call isn't reached if an exception is thrown.
-    InputSequenceEntry* z = ::new InputSequenceEntry(frame_, wxID_ANY, 
"Testing...");
-    LMI_ASSERT(z);
+    InputSequenceEntry* z = new(wx) InputSequenceEntry(frame_, wxID_ANY, 
"Testing...");
     wxTextCtrl& t = z->text_ctrl();
 
     ClipboardEx::SetText("1\r\n2\r\n3\r\n");



reply via email to

[Prev in Thread] Current Thread [Next in Thread]