1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-24 01:00:25 +00:00

Fix a bug found by Clang's -Wtautological-overlap-compare.

./help.cpp:880:89: error: overlapping comparisons always evaluate to false [-Werror,-Wtautological-overlap-compare]
        if(!((c->wall == waCavefloor || c->wall == waCavewall) && (c->land == laEmerald && c->land == laCaves)))
                                                                   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Arthur O'Dwyer 2020-03-23 14:48:56 -04:00
parent 5cc8a41beb
commit f49c57c4f0

View File

@ -877,7 +877,7 @@ EX void describeMouseover() {
"Trees in this forest can be chopped down. Big trees take two turns to chop down.";
else
if(c->wall != waSea && c->wall != waPalace && c->wall != waDeadfloor)
if(!((c->wall == waCavefloor || c->wall == waCavewall) && (c->land == laEmerald && c->land == laCaves)))
if(!((c->wall == waCavefloor || c->wall == waCavewall) && (c->land == laEmerald || c->land == laCaves)))
if(!((isAlch(c->wall) && c->land == laAlchemist)))
help = bygen([c] () { gotoHelpFor(c->wall); });
}