diff options
| author | Filippos Karapetis | 2011-10-05 13:02:01 +0300 | 
|---|---|---|
| committer | Filippos Karapetis | 2011-10-05 13:02:01 +0300 | 
| commit | 2a2e0377f365cc417a61a5f031e38a0b09114616 (patch) | |
| tree | cccc08644bc1b26e3509925bf9acbbb24fecfab9 | |
| parent | 7cfd7f3a666cfcfeb22613ba42a24f1d342b12ce (diff) | |
| download | scummvm-rg350-2a2e0377f365cc417a61a5f031e38a0b09114616.tar.gz scummvm-rg350-2a2e0377f365cc417a61a5f031e38a0b09114616.tar.bz2 scummvm-rg350-2a2e0377f365cc417a61a5f031e38a0b09114616.zip | |
SCUMM: Code formatting
| -rw-r--r-- | engines/scumm/detection.cpp | 21 | 
1 files changed, 10 insertions, 11 deletions
| diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp index 47b461f1bc..75668dfa73 100644 --- a/engines/scumm/detection.cpp +++ b/engines/scumm/detection.cpp @@ -314,7 +314,6 @@ static void closeDiskImage(ScummDiskImage *img) {   */  static bool detectSpeech(const Common::FSList &fslist, const GameSettings *gs) {  	if (gs->id == GID_MONKEY || gs->id == GID_MONKEY2) { -  		// FMTOWNS monkey and monkey2 games don't have speech but may have .sou files  		if (gs->platform == Common::kPlatformFMTowns)  			return false; @@ -332,16 +331,16 @@ static bool detectSpeech(const Common::FSList &fslist, const GameSettings *gs) {  #endif  		 0 }; -		for (Common::FSList::const_iterator file = fslist.begin(); -		 file != fslist.end(); ++file) { -			if (!file->isDirectory()) { -				for (int i = 0; basenames[i]; ++i) { -					for (int j = 0; extensions[j]; ++j) { -						Common::String filename = Common::String(basenames[i]) -						 + "." + Common::String(extensions[j]); -						if (filename.equalsIgnoreCase(file->getName())) -							return true; -					} +		for (Common::FSList::const_iterator file = fslist.begin(); file != fslist.end(); ++file) { +			if (file->isDirectory()) +				continue; + +			for (int i = 0; basenames[i]; ++i) { +				Common::String basename = Common::String(basenames[i]) + "."; + +				for (int j = 0; extensions[j]; ++j) { +					if ((basename + extensions[j]).equalsIgnoreCase(file->getName())) +						return true;  				}  			}  		} | 
