Remove unnecessary c_str() from wx var arg functions arguments

Using c_str() for arguments to wxString::Printf(), Format() and
wxLogXXX() is useless since wx 2.9 days, so simply remove them.

No real changes, this is just a (long due) cleanup.
This commit is contained in:
Vadim Zeitlin
2021-07-04 14:28:55 +01:00
parent 723265f9ef
commit f31a745909
50 changed files with 237 additions and 243 deletions

View File

@@ -136,7 +136,7 @@ wxChmTools::wxChmTools(const wxFileName &archive)
else
{
wxLogError(_("Failed to open CHM archive '%s'."),
archive.GetFullPath().c_str());
archive.GetFullPath());
m_lasterror = (chmd->last_error(chmd));
return;
}
@@ -268,9 +268,9 @@ size_t wxChmTools::Extract(const wxString& pattern, const wxString& filename)
// Error
m_lasterror = d->last_error(d);
wxLogError(_("Could not extract %s into %s: %s"),
wxString::FromAscii(f->filename).c_str(),
filename.c_str(),
ChmErrorMsg(m_lasterror).c_str());
wxString::FromAscii(f->filename),
filename,
ChmErrorMsg(m_lasterror));
return 0;
}
else
@@ -434,7 +434,7 @@ wxChmInputStream::wxChmInputStream(const wxString& archive,
}
else
{
wxLogError(_("Could not locate file '%s'."), filename.c_str());
wxLogError(_("Could not locate file '%s'."), filename);
m_lasterror = wxSTREAM_READ_ERROR;
return;
}
@@ -708,7 +708,7 @@ bool wxChmInputStream::CreateFileStream(const wxString& pattern)
if ( tmpfile.empty() )
{
wxLogError(_("Could not create temporary file '%s'"), tmpfile.c_str());
wxLogError(_("Could not create temporary file '%s'"), tmpfile);
return false;
}
@@ -716,7 +716,7 @@ bool wxChmInputStream::CreateFileStream(const wxString& pattern)
if ( m_chm->Extract(pattern, tmpfile) <= 0 )
{
wxLogError(_("Extraction of '%s' into '%s' failed."),
pattern.c_str(), tmpfile.c_str());
pattern, tmpfile);
if ( wxFileExists(tmpfile) )
wxRemoveFile(tmpfile);
return false;
@@ -877,7 +877,7 @@ wxString wxChmFSHandler::FindFirst(const wxString& spec, int WXUNUSED(flags))
!m_pattern.Contains(wxT(".hhp.cached")))
{
m_found.Printf(wxT("%s#chm:%s.hhp"),
left.c_str(), m_pattern.BeforeLast(wxT('.')).c_str());
left, m_pattern.BeforeLast(wxT('.')));
}
return m_found;