aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorD G Turner2018-10-16 13:30:44 +0100
committerD G Turner2018-10-16 13:30:44 +0100
commit5d340d244cc21f93b3cb7f46228fb767d9d16cd9 (patch)
treeeceafea47ce9ddb19220f481288ef18cdb9d13ab /engines
parent43fb9ebb1b188578e272885a318bc57abed42de9 (diff)
downloadscummvm-rg350-5d340d244cc21f93b3cb7f46228fb767d9d16cd9.tar.gz
scummvm-rg350-5d340d244cc21f93b3cb7f46228fb767d9d16cd9.tar.bz2
scummvm-rg350-5d340d244cc21f93b3cb7f46228fb767d9d16cd9.zip
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.
Diffstat (limited to 'engines')
-rw-r--r--engines/lastexpress/sound/sound.cpp2
1 files changed, 1 insertions, 1 deletions
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('.'))