mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-09-04 11:37:55 +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:
@@ -1318,9 +1318,7 @@ EX void set_crystal(int sides) {
|
||||
set_variation(eVariation::pure);
|
||||
ginf[gCrystal].sides = sides;
|
||||
ginf[gCrystal].vertex = 4;
|
||||
static char buf[20];
|
||||
sprintf(buf, "{%d,4}", sides);
|
||||
ginf[gCrystal].tiling_name = buf;
|
||||
ginf[gCrystal].tiling_name = hr::format("{%d,4}", sides);
|
||||
ginf[gCrystal].distlimit = distlimit_table[min(sides, MAX_EDGE_CRYSTAL-1)];
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user