diff --git a/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp b/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp index 6b1e22ccb5..9b35b8d99e 100644 --- a/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp +++ b/source/tools/atlas/AtlasUI/CustomControls/MapDialog/MapDialog.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2019 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -166,11 +166,11 @@ void MapDialog::OnListBox(wxCommandEvent& evt) else { wxString filePath = GetSelectedFilePath(); - AtlasMessage::qVFSFileExists fileExistsQuery(filePath.wc_str()); + AtlasMessage::qVFSFileExists fileExistsQuery(filePath.ToStdWstring()); fileExistsQuery.Post(); if (!filePath.IsEmpty() && fileExistsQuery.exists) { - AtlasMessage::qVFSFileRealPath pathQuery(filePath.wc_str()); + AtlasMessage::qVFSFileRealPath pathQuery(filePath.ToStdWstring()); pathQuery.Post(); wxDynamicCast(FindWindow(ID_MapDialogFilename), wxTextCtrl)->ChangeValue(*pathQuery.realPath); } @@ -221,7 +221,7 @@ void MapDialog::OpenFile() if (filePath.empty()) return; - AtlasMessage::qVFSFileExists qry(filePath.wc_str()); + AtlasMessage::qVFSFileExists qry(filePath.ToStdWstring()); qry.Post(); if (!qry.exists) return; @@ -236,7 +236,7 @@ void MapDialog::SaveFile() return; // TODO: this test would work better outside the VFS - AtlasMessage::qVFSFileExists qry(filePath.wc_str()); + AtlasMessage::qVFSFileExists qry(filePath.ToStdWstring()); qry.Post(); if (qry.exists) { diff --git a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp index 622cef2694..36cf68c085 100644 --- a/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp +++ b/source/tools/atlas/AtlasUI/ScenarioEditor/ScenarioEditor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2020 Wildfire Games. +/* Copyright (C) 2021 Wildfire Games. * This file is part of 0 A.D. * * 0 A.D. is free software: you can redistribute it and/or modify @@ -748,7 +748,7 @@ bool ScenarioEditor::OpenFile(const wxString& name, const wxString& filename) wxBusyInfo busy(_("Loading ") + name); wxBusyCursor busyc; - AtlasMessage::qVFSFileExists qry(filename.wc_str()); + AtlasMessage::qVFSFileExists qry(filename.ToStdWstring()); qry.Post(); if (!qry.exists) return false; @@ -758,7 +758,7 @@ bool ScenarioEditor::OpenFile(const wxString& name, const wxString& filename) m_ToolManager.SetCurrentTool(_T("")); // TODO: clear the undo buffer, etc - std::wstring map(filename.wc_str()); + std::wstring map(filename.ToStdWstring()); POST_MESSAGE(LoadMap, (map)); SetOpenFilename(name); @@ -811,7 +811,7 @@ void ScenarioEditor::OnImportHeightmap(wxCommandEvent& WXUNUSED(event)) OpenFile(_T(""), _T("maps/scenarios/_default.xml")); - std::wstring image(dlg.GetPath().wc_str()); + std::wstring image(dlg.GetPath().ToStdWstring()); POST_MESSAGE(ImportHeightmap, (image)); // TODO: Make this a non-undoable command @@ -855,7 +855,7 @@ void ScenarioEditor::OnSave(wxCommandEvent& event) // the preview units.) m_ToolManager.SetCurrentTool(_T("")); - std::wstring map(m_OpenFilename.wc_str()); + std::wstring map(m_OpenFilename.ToStdWstring()); POST_MESSAGE(SaveMap, (map)); // Wait for it to finish saving @@ -877,7 +877,7 @@ void ScenarioEditor::OnSaveAs(wxCommandEvent& WXUNUSED(event)) m_ToolManager.SetCurrentTool(_T("")); - std::wstring map(filePath.wc_str()); + std::wstring map(filePath.ToStdWstring()); POST_MESSAGE(SaveMap, (map)); SetOpenFilename(filePath);