Skip to content

Commit

Permalink
Fixed string vs. string_view code that works in VS but not gcc/clang.
Browse files Browse the repository at this point in the history
  • Loading branch information
sa666666 committed May 10, 2024
1 parent a8a23f6 commit 7d99a61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/emucore/KidVid.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,15 @@ bool KidVid::load(Serializer& in)
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
string KidVid::getFileName() const
{
static constexpr std::array<string, 6> fileNames = {
static constexpr std::array<string_view, 6> fileNames = {
"KVS3.WAV", "KVS1.WAV", "KVS2.WAV",
"KVB3.WAV", "KVB1.WAV", "KVB2.WAV"
};

int i = myGame == Game::Smurfs ? myTape - 1 : myTape + 2;
if(myTape == 4) i = 3;

return fileNames[i];
return string{fileNames[i]};
}

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Expand Down

0 comments on commit 7d99a61

Please sign in to comment.