Skip to content

Commit

Permalink
Fix -Wint-in-bool-context
Browse files Browse the repository at this point in the history
The mattrig macro expands the mw argument at one point into:

if (curmat != MAT_WATER ? S_SPLASH2 : S_SPLASH1 >= 0)

Co-authored-by: Robert Alm Nilsson <[email protected]>
  • Loading branch information
voidanix and Robert Alm Nilsson committed Jun 24, 2022
1 parent 7a06a78 commit 10f8631
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/game/physics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ namespace physics
{ \
int col = (int(mcol[2]*mq) + (int(mcol[1]*mq) << 8) + (int(mcol[0]*mq) << 16)); \
regularshape(mp, mt, col, 21, 20, mz, mo, ms, 1, 10, 0, 20); \
if(mw >= 0) playsound(mw, mo, pl); \
if((mw) >= 0) playsound(mw, mo, pl); \
}
if(curmat == MAT_WATER || oldmat == MAT_WATER)
{
Expand Down

0 comments on commit 10f8631

Please sign in to comment.