several vc++ compiler fixes

This commit is contained in:
Anthony Rabine 2023-08-09 14:34:38 +02:00
parent d10afb0232
commit 31323de3cf
3 changed files with 9 additions and 5 deletions

View file

@ -74,6 +74,10 @@ struct AudioCommand {
std::string filename;
};
#if !defined(__PRETTY_FUNCTION__) && !defined(__GNUC__)
#define __PRETTY_FUNCTION__ __FUNCSIG__
#endif
/**
* The class implements a bare minimum required to demonstrate a model-based

View file

@ -61,12 +61,12 @@ private:
void StoryProject::SaveStory(const std::vector<uint8_t> &m_program)
{
std::ofstream o(m_working_dir + std::filesystem::path::preferred_separator + "story.c32", std::ios::out | std::ios::binary);
std::ofstream o(m_working_dir / "story.c32", std::ios::out | std::ios::binary);
o.write(reinterpret_cast<const char*>(m_program.data()), m_program.size());
o.close();
Tlv tlv(m_working_dir + std::filesystem::path::preferred_separator + "index.ost");
auto p = m_working_dir / "index.ost";
Tlv tlv(p.string());
tlv.add_array(1);
@ -401,6 +401,6 @@ std::string StoryProject::GetProjectFilePath() const
std::string StoryProject::GetWorkingDir() const
{
return m_working_dir;
return m_working_dir.string();
}

View file

@ -127,7 +127,7 @@ private:
std::string m_titleSound;
std::vector<Resource> m_resources;
std::string m_working_dir; /// Temporary folder based on the uuid, where the archive is unzipped
std::filesystem::path m_working_dir; /// Temporary folder based on the uuid, where the archive is unzipped
std::string m_project_file_path; /// JSON project file
int m_display_w{320};