zenorogue / hyperrogue

A SDL roguelike in a non-euclidean world
GNU General Public License v2.0
554 stars 66 forks source link

Avoid sprintf, in favor of hr::format and snprintf #340

Closed Quuxplusone closed 11 months ago

Quuxplusone commented 11 months ago

Apple Xcode now gives -Wdeprecated-declarations on any attempt to use sprintf. Which is silly, but also easy to fix. C++20 adds std::format, which will ambiguate unqualified calls to hr::format. Add the qualification everywhere. No intended functional change (although the calls to hr::format do perform more memory allocations than the old raw s[n]printf calls did).