From: Vadim Zeitlin Date: Sat, 8 Oct 2005 18:33:28 +0000 (+0000) Subject: more 'unreachable code' warnings which had been disabled instead of being fixed X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/31df756d7447e51c1a42c3a72a8e16f0d798e7b1 more 'unreachable code' warnings which had been disabled instead of being fixed git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/motif/dialog.cpp b/src/motif/dialog.cpp index c230211bfc..cc38234f56 100644 --- a/src/motif/dialog.cpp +++ b/src/motif/dialog.cpp @@ -105,7 +105,6 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, m_foregroundColour = *wxBLACK; Widget dialogShell = (Widget) m_mainWidget; - Widget shell = XtParent(dialogShell) ; SetTitle( title ); @@ -131,6 +130,7 @@ bool wxDialog::Create(wxWindow *parent, wxWindowID id, // is managed, so we manage without mapping to the screen. // To show, we map the shell (actually it's parent). #if !wxUSE_INVISIBLE_RESIZE + Widget shell = XtParent(dialogShell) ; XtVaSetValues(shell, XmNmappedWhenManaged, False, NULL); #endif @@ -194,21 +194,10 @@ bool wxDialog::XmDoCreateTLW(wxWindow* parent, void wxDialog::SetModal(bool flag) { -#ifdef __VMS -#pragma message disable codcauunr -#endif if ( flag ) - m_windowStyle |= wxDIALOG_MODAL ; - else - if ( m_windowStyle & wxDIALOG_MODAL ) - m_windowStyle -= wxDIALOG_MODAL ; - - wxModelessWindows.DeleteObject(this); - if (!flag) - wxModelessWindows.Append(this); -#ifdef __VMS -#pragma message enable codcauunr -#endif + wxModelessWindows.DeleteObject(this); + else + wxModelessWindows.Append(this); } wxDialog::~wxDialog() diff --git a/src/motif/toplevel.cpp b/src/motif/toplevel.cpp index 01342c5b9b..bfa9a8a982 100644 --- a/src/motif/toplevel.cpp +++ b/src/motif/toplevel.cpp @@ -65,14 +65,7 @@ static void wxTLWEventHandler( Widget wid, void wxTopLevelWindowMotif::PreDestroy() { -#ifdef __VMS -#pragma message disable codcauunr -#endif - if ( (GetWindowStyleFlag() & wxDIALOG_MODAL) != wxDIALOG_MODAL ) - wxModelessWindows.DeleteObject(this); -#ifdef __VMS -#pragma message enable codcauunr -#endif + wxModelessWindows.DeleteObject(this); m_icons.m_icons.Empty();