Codechange: move misc settings to std::string

This commit is contained in:
rubidium42
2021-04-28 17:32:33 +02:00
committed by rubidium42
parent 77330d09fd
commit 95386dc2b8
7 changed files with 37 additions and 45 deletions

View File

@@ -34,7 +34,7 @@
static const char * const SCREENSHOT_NAME = "screenshot"; ///< Default filename of a saved screenshot.
static const char * const HEIGHTMAP_NAME = "heightmap"; ///< Default filename of a saved heightmap.
char _screenshot_format_name[8]; ///< Extension of the current screenshot format (corresponds with #_cur_screenshot_format).
std::string _screenshot_format_name; ///< Extension of the current screenshot format (corresponds with #_cur_screenshot_format).
uint _num_screenshot_formats; ///< Number of available screenshot formats.
uint _cur_screenshot_format; ///< Index of the currently selected screenshot format in #_screenshot_formats.
static char _screenshot_name[128]; ///< Filename of the screenshot file.
@@ -584,7 +584,7 @@ void InitializeScreenshotFormats()
{
uint j = 0;
for (uint i = 0; i < lengthof(_screenshot_formats); i++) {
if (!strcmp(_screenshot_format_name, _screenshot_formats[i].extension)) {
if (_screenshot_format_name.compare(_screenshot_formats[i].extension) != 0) {
j = i;
break;
}