mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-23 04:22:34 +00:00
- 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]
This commit is contained in:
parent
72c8df530f
commit
5a56f209d3
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue