From ecc9ba0ef90459804e0c6994466b4625de9272ee Mon Sep 17 00:00:00 2001 From: Glenn Maynard Date: Wed, 29 Oct 2003 19:39:02 +0000 Subject: [PATCH] simplify --- stepmania/src/RandomSample.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/stepmania/src/RandomSample.cpp b/stepmania/src/RandomSample.cpp index 5bce2e1a09..c57c8776f7 100644 --- a/stepmania/src/RandomSample.cpp +++ b/stepmania/src/RandomSample.cpp @@ -31,13 +31,10 @@ RandomSample::~RandomSample() bool RandomSample::Load( CString sFilePath, int iMaxToLoad ) { - CString sDir, sFName, sExt; - splitrelpath( sFilePath, sDir, sFName, sExt ); - - sExt.MakeLower(); - - if( sExt == "" ) return LoadSoundDir( sFilePath, iMaxToLoad ); - else return LoadSound( sFilePath ); + if( GetExtension(sFilePath) == "" ) + return LoadSoundDir( sFilePath, iMaxToLoad ); + else + return LoadSound( sFilePath ); } void RandomSample::UnloadAll()