mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2026-03-01 11:19:43 +00:00
Add a helper function voidp to silence GCC warnings about %p.
We must fully qualify calls to `hr::voidp` because the expression `voidp(x)` is ambiguous or worse. "/usr/include/zconf.h" defines `voidp` in the global namespace as a typedef for `void*`. We don't want an unsafe functional-style cast to `void*`; we want to call our nice safe helper function. So we qualify the name.
This commit is contained in:
2
help.cpp
2
help.cpp
@@ -832,7 +832,7 @@ EX void describeMouseover() {
|
||||
if(c->land == laTortoise && tortoise::seek()) out += " " + tortoise::measure(getBits(c));
|
||||
|
||||
if(buggyGeneration) {
|
||||
char buf[80]; sprintf(buf, " %p H=%d M=%d", c, c->landparam, c->mpdist); out += buf;
|
||||
char buf[80]; sprintf(buf, " %p H=%d M=%d", hr::voidp(c), c->landparam, c->mpdist); out += buf;
|
||||
}
|
||||
|
||||
if(randomPatternsMode)
|
||||
|
||||
Reference in New Issue
Block a user