From 5d340d244cc21f93b3cb7f46228fb767d9d16cd9 Mon Sep 17 00:00:00 2001 From: D G Turner Date: Tue, 16 Oct 2018 13:30:44 +0100 Subject: LASTEXPRESS: Fix Compiler Warning in Sound Code. The SoundFlag type is an enumeration which have a default underlying type of unsigned int in most case. Thus comparing this to -1 causes a compiler warning. Since the default entity sound flag type is 0xFFFF... which is equivalent to -1, then replacing this with the correct enum symbol fixes the issue and should result in the correct behaviour. Examination of the resulting code line seems to confirm that this is the correct expected logic. --- engines/lastexpress/sound/sound.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'engines/lastexpress') diff --git a/engines/lastexpress/sound/sound.cpp b/engines/lastexpress/sound/sound.cpp index a226250956..c8240e90c2 100644 --- a/engines/lastexpress/sound/sound.cpp +++ b/engines/lastexpress/sound/sound.cpp @@ -139,7 +139,7 @@ void SoundManager::playSound(EntityIndex entity, Common::String filename, SoundF if (_queue->isBuffered(entity) && entity && entity < kEntityTrain) _queue->removeFromQueue(entity); - SoundFlag currentFlag = (flag == -1) ? getSoundFlag(entity) : (SoundFlag)(flag | 0x80000); + SoundFlag currentFlag = (flag == kSoundVolumeEntityDefault) ? getSoundFlag(entity) : (SoundFlag)(flag | 0x80000); // Add .SND at the end of the filename if needed if (!filename.contains('.')) -- cgit v1.2.3