Fix compilation with wx built with --enable-stl

--enable-stl replaces the implicit conversion to char/wchar_t* with one
to std::[w]string. This breaks conversions to boost::filesytem::path and
makes some ternaries ambiguous (which GCC helpfully reports as no
conversion existing rather than an ambiguous conversion).
This commit is contained in:
Thomas Goyne 2014-01-05 08:10:08 -08:00
parent 46315d872f
commit f71b380f01
3 changed files with 5 additions and 5 deletions

View File

@ -570,9 +570,9 @@ void BaseGrid::GetRowStrings(int row, AssDialogue *line, bool *paint_columns, wx
if (paint_columns[4]) strings[4] = to_wx(line->Style); if (paint_columns[4]) strings[4] = to_wx(line->Style);
if (paint_columns[5]) strings[5] = to_wx(line->Actor); if (paint_columns[5]) strings[5] = to_wx(line->Actor);
if (paint_columns[6]) strings[6] = to_wx(line->Effect); if (paint_columns[6]) strings[6] = to_wx(line->Effect);
if (paint_columns[7]) strings[7] = line->Margin[0] ? std::to_wstring(line->Margin[0]) : wxString(); if (paint_columns[7]) strings[7] = line->Margin[0] ? wxString(std::to_wstring(line->Margin[0])) : wxString();
if (paint_columns[8]) strings[8] = line->Margin[1] ? std::to_wstring(line->Margin[1]) : wxString(); if (paint_columns[8]) strings[8] = line->Margin[1] ? wxString(std::to_wstring(line->Margin[1])) : wxString();
if (paint_columns[9]) strings[9] = line->Margin[2] ? std::to_wstring(line->Margin[2]) : wxString(); if (paint_columns[9]) strings[9] = line->Margin[2] ? wxString(std::to_wstring(line->Margin[2])) : wxString();
if (paint_columns[10]) { if (paint_columns[10]) {
strings[10].clear(); strings[10].clear();

View File

@ -476,7 +476,7 @@ static void save_snapshot(agi::Context *c, bool raw) {
// If where ever that is isn't defined, we can't save there // If where ever that is isn't defined, we can't save there
if ((basepath == "\\") || (basepath == "/")) { if ((basepath == "\\") || (basepath == "/")) {
// So save to the current user's home dir instead // So save to the current user's home dir instead
basepath = wxGetHomeDir(); basepath = wxGetHomeDir().c_str();
} }
} }
// Actual fixed (possibly relative) path, decode it // Actual fixed (possibly relative) path, decode it

View File

@ -150,7 +150,7 @@ void DialogAttachments::OnExtract(wxCommandEvent &) {
// Multiple or single? // Multiple or single?
if (listView->GetNextSelected(i) != -1) if (listView->GetNextSelected(i) != -1)
path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())); path = wxDirSelector(_("Select the path to save the files to:"), to_wx(OPT_GET("Path/Fonts Collector Destination")->GetString())).c_str();
else { else {
path = SaveFileSelector( path = SaveFileSelector(
_("Select the path to save the file to:"), _("Select the path to save the file to:"),