From d451084fb44a536d0f161bccb5b73088df253c9c Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 8 Dec 2010 01:35:12 +0000 Subject: MT32: Get rid of ANSIFile. svn-id: r54827 --- sound/softsynth/mt32/synth.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'sound/softsynth/mt32/synth.cpp') diff --git a/sound/softsynth/mt32/synth.cpp b/sound/softsynth/mt32/synth.cpp index 6a16db22ec..8cf2233654 100644 --- a/sound/softsynth/mt32/synth.cpp +++ b/sound/softsynth/mt32/synth.cpp @@ -162,21 +162,11 @@ void Synth::initReverb(Bit8u newRevMode, Bit8u newRevTime, Bit8u newRevLevel) { } File *Synth::openFile(const char *filename, File::OpenMode mode) { - if (myProp.openFile != NULL) { - return myProp.openFile(myProp.userData, filename, mode); - } - char pathBuf[2048]; - if (myProp.baseDir != NULL) { - strcpy(&pathBuf[0], myProp.baseDir); - strcat(&pathBuf[0], filename); - filename = pathBuf; - } - ANSIFile *file = new ANSIFile(); - if (!file->open(filename, mode)) { - delete file; - return NULL; - } - return file; + // It should never happen that openFile is NULL in our use case. + // Just to cover the case where something is horrible wrong we + // use an assert here. + assert(myProp.openFile != NULL); + return myProp.openFile(myProp.userData, filename, mode); } void Synth::closeFile(File *file) { -- cgit v1.2.3