Qt c++ function name shadow warnings

We have a struct called mkroom and a function called mkroom()
so c++ complains about the mkroom() function hiding the
initializer for the struct.

Similarly, we have a struct called attack and a function
called attack().

There may be a more elegant way of eliminating those two
warnings, but renaming mkroom() to do_mkroom() and
attack() to do_attack() was straightforward enough.
This commit is contained in:
nhmall
2021-02-03 10:55:07 -05:00
parent 24c829ecf7
commit 7900632b50
8 changed files with 33 additions and 32 deletions

View File

@@ -1029,7 +1029,7 @@ use_pick_axe2(struct obj *obj)
boolean ispick = is_pick(obj);
const char *verbing = ispick ? "digging" : "chopping";
if (u.uswallow && attack(u.ustuck)) {
if (u.uswallow && do_attack(u.ustuck)) {
; /* return 1 */
} else if (Underwater) {
pline("Turbulence torpedoes your %s attempts.", verbing);
@@ -1060,7 +1060,7 @@ use_pick_axe2(struct obj *obj)
return 1;
}
lev = &levl[rx][ry];
if (MON_AT(rx, ry) && attack(m_at(rx, ry)))
if (MON_AT(rx, ry) && do_attack(m_at(rx, ry)))
return 1;
dig_target = dig_typ(obj, rx, ry);
if (dig_target == DIGTYP_UNDIGGABLE) {