1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-26 03:17:39 +00:00

Eliminate calls to sprintf

Apple Xcode has started giving `-Wdeprecated-declarations` warnings
for `sprintf`, and suggesting that people migrate to `snprintf` instead.
This is silly, but the warnings are spam and need to be silenced
somehow. Migrating to `snprintf` and/or `hr::format` is the path of
least resistance.
This commit is contained in:
Arthur O'Dwyer
2023-08-21 10:14:19 -07:00
parent ced3bbcad4
commit 10d0ed8900
11 changed files with 22 additions and 39 deletions

View File

@@ -308,8 +308,6 @@ struct debugScreen {
#if CAP_SHAPES
queuepoly(gmatrix[what], cgi.shAsymmetric, 0x80808080);
#endif
char buf[200];
sprintf(buf, "%p", hr::voidp(what));
dialog::addSelItem("mpdist", its(what->mpdist), 'd');
dialog::add_action([what] () {
bitfield_editor(what->mpdist, [what] (int i) { what->mpdist = 0; }, "generation level");
@@ -390,7 +388,7 @@ struct debugScreen {
dialog::addBreak(50);
if(show_debug_data) {
dialog::addSelItem("pointer", s0+buf+"/"+index_pointer(what), 0);
dialog::addSelItem("pointer", s0+hr::format("%p", hr::voidp(what))+"/"+index_pointer(what), 0);
dialog::addSelItem("cpdist", its(what->cpdist), 0);
dialog::addSelItem("celldist", its(celldist(what)), 0);
dialog::addSelItem("celldistance", its(celldistance(cwt.at, what)), 0);