Codechange: use std::string for base media filename/warning storage

This commit is contained in:
Rubidium
2023-04-18 22:21:17 +02:00
committed by rubidium42
parent b8f0513a72
commit 43c65a3fec
8 changed files with 39 additions and 44 deletions

View File

@@ -23,7 +23,7 @@
static SoundEntry _original_sounds[ORIGINAL_SAMPLE_COUNT];
static void OpenBankFile(const char *filename)
static void OpenBankFile(const std::string &filename)
{
/**
* The sound file for the original sounds, i.e. those not defined/overridden by a NewGRF.
@@ -34,7 +34,7 @@ static void OpenBankFile(const char *filename)
memset(_original_sounds, 0, sizeof(_original_sounds));
/* If there is no sound file (nosound set), don't load anything */
if (filename == nullptr) return;
if (filename.empty()) return;
original_sound_file.reset(new RandomAccessFile(filename, BASESET_DIR));
size_t pos = original_sound_file->GetPos();