Combine return statements in OPENGL_GAL::CheckFeatures
This commit is contained in:
parent
4314e4dc93
commit
33385d0bb0
|
@ -327,8 +327,11 @@ OPENGL_GAL::~OPENGL_GAL()
|
|||
|
||||
wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
|
||||
{
|
||||
wxString retVal = wxEmptyString;
|
||||
|
||||
wxFrame* testFrame = new wxFrame( NULL, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 1, 1 ),
|
||||
wxFRAME_TOOL_WINDOW | wxNO_BORDER );
|
||||
|
||||
KIGFX::OPENGL_GAL* opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
||||
|
||||
testFrame->Raise();
|
||||
|
@ -342,15 +345,13 @@ wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
|
|||
catch( std::runtime_error& err )
|
||||
{
|
||||
//Test failed
|
||||
delete opengl_gal;
|
||||
delete testFrame;
|
||||
return wxString( err.what() );
|
||||
retVal = wxString( err.what() );
|
||||
}
|
||||
|
||||
//Test passed
|
||||
delete opengl_gal;
|
||||
delete testFrame;
|
||||
return wxEmptyString;
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue