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 OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
|
||||||
{
|
{
|
||||||
|
wxString retVal = wxEmptyString;
|
||||||
|
|
||||||
wxFrame* testFrame = new wxFrame( NULL, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 1, 1 ),
|
wxFrame* testFrame = new wxFrame( NULL, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 1, 1 ),
|
||||||
wxFRAME_TOOL_WINDOW | wxNO_BORDER );
|
wxFRAME_TOOL_WINDOW | wxNO_BORDER );
|
||||||
|
|
||||||
KIGFX::OPENGL_GAL* opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
KIGFX::OPENGL_GAL* opengl_gal = new KIGFX::OPENGL_GAL( aOptions, testFrame );
|
||||||
|
|
||||||
testFrame->Raise();
|
testFrame->Raise();
|
||||||
|
@ -342,15 +345,13 @@ wxString OPENGL_GAL::CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions )
|
||||||
catch( std::runtime_error& err )
|
catch( std::runtime_error& err )
|
||||||
{
|
{
|
||||||
//Test failed
|
//Test failed
|
||||||
delete opengl_gal;
|
retVal = wxString( err.what() );
|
||||||
delete testFrame;
|
|
||||||
return wxString( err.what() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//Test passed
|
|
||||||
delete opengl_gal;
|
delete opengl_gal;
|
||||||
delete testFrame;
|
delete testFrame;
|
||||||
return wxEmptyString;
|
|
||||||
|
return retVal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue