mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-28 12:27:40 +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:
@@ -439,9 +439,7 @@ EX namespace netgen {
|
||||
for(int ix=0; ix<PX; ix++) {
|
||||
for(int y=0; y<qy; y++) for(int x=0; x<qx; x++)
|
||||
qpixel(quarter,x,y) = qpixel(net, x+qx*ix, y+qy*iy);
|
||||
char buf[64];
|
||||
sprintf(buf, "papermodel-page%d%d" IMAGEEXT, iy, ix);
|
||||
IMAGESAVE(quarter, buf);
|
||||
IMAGESAVE(quarter, hr::format("papermodel-page%d%d" IMAGEEXT, iy, ix).c_str());
|
||||
}
|
||||
|
||||
SDL_FreeSurface(net);
|
||||
|
||||
Reference in New Issue
Block a user