[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master ab4df50: Simplify
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master ab4df50: Simplify |
Date: |
Wed, 27 Jun 2018 09:42:22 -0400 (EDT) |
branch: master
commit ab4df50e9d47d1148a304056c158aa1f1147d60b
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Simplify
---
alert_wx.cpp | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/alert_wx.cpp b/alert_wx.cpp
index f865745..e4f8f3b 100644
--- a/alert_wx.cpp
+++ b/alert_wx.cpp
@@ -56,19 +56,13 @@ bool volatile ensure_setup = set_alert_functions
void status_alert(std::string const& s)
{
- if(wxTheApp && wxTheApp->GetTopWindow())
- {
- wxFrame* f = dynamic_cast<wxFrame*>(wxTheApp->GetTopWindow());
- if(f)
- {
- wxStatusBar* b = f->GetStatusBar();
- if(b)
+ if(wxTheApp)
+ if(wxFrame* f = dynamic_cast<wxFrame*>(wxTheApp->GetTopWindow()))
+ if(wxStatusBar* b = f->GetStatusBar())
{
- f->SetStatusText(s);
- f->GetStatusBar()->Update();
+ b->SetStatusText(s);
+ b->Update();
}
- }
- }
}
void warning_alert(std::string const& s)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [lmi] master ab4df50: Simplify,
Greg Chicares <=