replace all instances of wxString with std::string in all cases not

directly involved in either the GUI or other wxWidget classes like wxFile
This commit is contained in:
Peter Tissen 2014-04-01 02:33:55 +02:00
parent b1894ac6cb
commit 8ac226ae69
124 changed files with 1716 additions and 1502 deletions

View file

@ -9,7 +9,7 @@ vfsLocalDir::~vfsLocalDir()
{
}
bool vfsLocalDir::Open(const wxString& path)
bool vfsLocalDir::Open(const std::string& path)
{
if(!vfsDirBase::Open(path))
return false;
@ -22,10 +22,10 @@ bool vfsLocalDir::Open(const wxString& path)
wxString name;
for(bool is_ok = dir.GetFirst(&name); is_ok; is_ok = dir.GetNext(&name))
{
wxString dir_path = path + name;
wxString dir_path = fmt::FromUTF8(path) + name;
DirEntryInfo& info = m_entries[m_entries.Move(new DirEntryInfo())];
info.name = name;
info.name = fmt::ToUTF8(name);
info.flags |= dir.Exists(dir_path) ? DirEntry_TypeDir : DirEntry_TypeFile;
if(wxIsWritable(dir_path)) info.flags |= DirEntry_PermWritable;
@ -36,17 +36,17 @@ bool vfsLocalDir::Open(const wxString& path)
return true;
}
bool vfsLocalDir::Create(const wxString& path)
bool vfsLocalDir::Create(const std::string& path)
{
return wxFileName::Mkdir(path, 0777, wxPATH_MKDIR_FULL);
return wxFileName::Mkdir(fmt::FromUTF8(path), 0777, wxPATH_MKDIR_FULL);
}
bool vfsLocalDir::Rename(const wxString& from, const wxString& to)
bool vfsLocalDir::Rename(const std::string& from, const std::string& to)
{
return false;
}
bool vfsLocalDir::Remove(const wxString& path)
bool vfsLocalDir::Remove(const std::string& path)
{
return wxRmdir(path);
return wxRmdir(fmt::FromUTF8(path));
}