From 5fd75f49cec350160400ea631b55c3595c524298 Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Thu, 24 Jan 2013 22:18:24 -0500 Subject: [PATCH] Nothing against goto, but this must goto trash. ...ugh. Bad pun. --- src/StepMania.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 47c607bfce..1cf6a14ead 100644 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -626,6 +626,7 @@ bool CheckVideoDefaultSettings() LOG->Trace( "Last seen video driver: %s", PREFSMAN->m_sLastSeenVideoDriver.Get().c_str() ); VideoCardDefaults defaults; + bool found = false; for( unsigned i=0; iTrace( "Card matches '%s'.", sDriverRegex.size()? sDriverRegex.c_str():"(unknown card)" ); - goto found_defaults; + found = true; + break; } } - FAIL_M("Failed to match video driver"); - -found_defaults: + if (!found) + { + FAIL_M("Failed to match video driver"); + } bool bSetDefaultVideoParams = false; if( PREFSMAN->m_sVideoRenderers.Get() == "" )