Fix compile errors on GCC

This commit is contained in:
Connor McLaughlin
2019-11-03 00:15:42 +10:00
parent 6dc7069d7c
commit 5abbdef065
6 changed files with 15 additions and 9 deletions

View File

@ -243,7 +243,11 @@ std::shared_ptr<MemoryCard> MemoryCard::Open(System* system, std::string_view fi
mc->m_filename = filename;
if (!mc->LoadFromFile())
{
Log_ErrorPrintf("Memory card at '%s' could not be read, formatting.");
SmallString message;
message.AppendString("Memory card at '");
message.AppendString(filename.data(), filename.length());
message.AppendString("' could not be read, formatting.");
Log_ErrorPrint(message);
mc->Format();
}
@ -359,4 +363,4 @@ bool MemoryCard::SaveToFile()
Log_InfoPrintf("Saved memory card to '%s'", m_filename.c_str());
m_system->GetHostInterface()->AddOSDMessage(SmallString::FromFormat("Saved memory card to '%s'", m_filename.c_str()));
return true;
}
}