From 5a56f209d39e11d08183c518b4cd6d22916e0e49 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 12 Apr 2020 11:49:47 +0300 Subject: [PATCH] - fixed conditions with SND_PlayerReserve flag src/sound/s_advsound.cpp:953:9: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] src/sound/s_advsound.cpp:1264:20: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] src/sound/s_advsound.cpp:1426:6: warning: logical not is only applied to the left hand side of this bitwise operator [-Wlogical-not-parentheses] --- src/sound/s_advsound.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/s_advsound.cpp b/src/sound/s_advsound.cpp index 990943add..019dd2a21 100644 --- a/src/sound/s_advsound.cpp +++ b/src/sound/s_advsound.cpp @@ -950,7 +950,7 @@ static void S_AddSNDINFO (int lump) S_ParsePlayerSoundCommon (sc, pclass, gender, refid); targid = soundEngine->FindSoundNoHash (sc.String); - if (!S_sfx[targid].UserData[0] & SND_PlayerReserve) + if (!(S_sfx[targid].UserData[0] & SND_PlayerReserve)) { sc.ScriptError ("%s is not a player sound", sc.String); } @@ -1261,7 +1261,7 @@ static void S_ParsePlayerSoundCommon (FScanner &sc, FString &pclass, int &gender sc.MustGetString (); refid = soundEngine->FindSoundNoHash (sc.String); auto &S_sfx = soundEngine->GetSounds(); - if (refid != 0 && !S_sfx[refid].UserData[0] & SND_PlayerReserve && !S_sfx[refid].bTentative) + if (refid != 0 && !(S_sfx[refid].UserData[0] & SND_PlayerReserve) && !S_sfx[refid].bTentative) { sc.ScriptError ("%s has already been used for a non-player sound.", sc.String); } @@ -1423,7 +1423,7 @@ int S_LookupPlayerSound (const char *pclass, int gender, const char *name) int S_LookupPlayerSound (const char *pclass, int gender, FSoundID refid) { auto &S_sfx = soundEngine->GetSounds(); - if (!S_sfx[refid].UserData[0] & SND_PlayerReserve) + if (!(S_sfx[refid].UserData[0] & SND_PlayerReserve)) { // Not a player sound, so just return this sound return refid; }