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

@@ -2732,7 +2732,7 @@ use_whip(struct obj *obj)
if (proficient < 0)
proficient = 0;
if (u.uswallow && attack(u.ustuck)) {
if (u.uswallow && do_attack(u.ustuck)) {
There("is not enough room to flick your bullwhip.");
} else if (Underwater) {
@@ -2806,7 +2806,7 @@ use_whip(struct obj *obj)
if (bigmonst(mtmp->data)) {
wrapped_what = strcpy(buf, mon_nam(mtmp));
} else if (proficient) {
if (attack(mtmp))
if (do_attack(mtmp))
return 1;
else
pline1(msg_snap);
@@ -2936,7 +2936,7 @@ use_whip(struct obj *obj)
else
You("flick your bullwhip towards %s.", mon_nam(mtmp));
if (proficient) {
if (attack(mtmp))
if (do_attack(mtmp))
return 1;
else
pline1(msg_snap);