Slightly simplify wxEntryStart() app creation code
No real changes, just combine the variable declaration and test in a single statement.
This commit is contained in:
parent
5f486a0806
commit
201089a8a1
1 changed files with 3 additions and 6 deletions
|
|
@ -296,13 +296,10 @@ bool wxEntryStart(int& argc, wxChar **argv)
|
|||
wxAppPtr app(wxTheApp);
|
||||
if ( !app.get() )
|
||||
{
|
||||
// if not, he might have used wxIMPLEMENT_APP() to give us a
|
||||
// function to create it
|
||||
wxAppInitializerFunction fnCreate = wxApp::GetInitializerFunction();
|
||||
|
||||
if ( fnCreate )
|
||||
// if they didn't, we should normally have the initializer function set
|
||||
// up by wxIMPLEMENT_APP(), so use it to create one now
|
||||
if ( auto fnCreate = wxApp::GetInitializerFunction() )
|
||||
{
|
||||
// he did, try to create the custom wxApp object
|
||||
app.Set((*fnCreate)());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue