mirror of
https://github.com/cookiengineer/audacity
synced 2025-12-15 17:11:20 +01:00
Remove needless uses of wxString::c_str() in wxString::Format...
... and similar wx "variadics," which all treat wxString smartly enough that you don't need this. Don't need c_str either to convert wxString to const wxChar * because wxString has a conversion operator that does the same.
This commit is contained in:
@@ -472,8 +472,8 @@ void Sequence::Paste(sampleCount s, const Sequence *src)
|
||||
wxLogError(
|
||||
wxT("Sequence::Paste: sampleCount s %s is < 0 or > mNumSamples %s)."),
|
||||
// PRL: Why bother with Internat when the above is just wxT?
|
||||
Internat::ToString(s.as_double(), 0).c_str(),
|
||||
Internat::ToString(mNumSamples.as_double(), 0).c_str());
|
||||
Internat::ToString(s.as_double(), 0),
|
||||
Internat::ToString(mNumSamples.as_double(), 0));
|
||||
THROW_INCONSISTENCY_EXCEPTION;
|
||||
}
|
||||
|
||||
@@ -483,8 +483,8 @@ void Sequence::Paste(sampleCount s, const Sequence *src)
|
||||
wxLogError(
|
||||
wxT("Sequence::Paste: mNumSamples %s + src->mNumSamples %s would overflow."),
|
||||
// PRL: Why bother with Internat when the above is just wxT?
|
||||
Internat::ToString(mNumSamples.as_double(), 0).c_str(),
|
||||
Internat::ToString(src->mNumSamples.as_double(), 0).c_str());
|
||||
Internat::ToString(mNumSamples.as_double(), 0),
|
||||
Internat::ToString(src->mNumSamples.as_double(), 0));
|
||||
THROW_INCONSISTENCY_EXCEPTION;
|
||||
}
|
||||
|
||||
@@ -845,7 +845,7 @@ bool Sequence::HandleXMLTag(const wxChar *tag, const wxChar **attrs)
|
||||
mErrorOpening = true;
|
||||
wxLogWarning(
|
||||
wxT(" Sequence has bad %s attribute value, %s, that should be a positive integer."),
|
||||
attr, strValue.c_str());
|
||||
attr, strValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -976,8 +976,8 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
|
||||
wxLogWarning(
|
||||
wxT(" Sequence has missing block file with length %s > mMaxSamples %s.\n Setting length to mMaxSamples. This will likely cause some block files to be considered orphans."),
|
||||
// PRL: Why bother with Internat when the above is just wxT?
|
||||
Internat::ToString(len.as_double(), 0).c_str(),
|
||||
Internat::ToString((double)mMaxSamples, 0).c_str());
|
||||
Internat::ToString(len.as_double(), 0),
|
||||
Internat::ToString((double)mMaxSamples, 0));
|
||||
len = mMaxSamples;
|
||||
}
|
||||
// len is at most mMaxSamples:
|
||||
@@ -1003,9 +1003,9 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
|
||||
wxT(" Start (%s) for block file %s is not one sample past end of previous block (%s).\n")
|
||||
wxT(" Moving start so blocks are contiguous."),
|
||||
// PRL: Why bother with Internat when the above is just wxT?
|
||||
Internat::ToString(block.start.as_double(), 0).c_str(),
|
||||
sFileAndExtension.c_str(),
|
||||
Internat::ToString(numSamples.as_double(), 0).c_str());
|
||||
Internat::ToString(block.start.as_double(), 0),
|
||||
sFileAndExtension,
|
||||
Internat::ToString(numSamples.as_double(), 0));
|
||||
block.start = numSamples;
|
||||
mErrorOpening = true;
|
||||
}
|
||||
@@ -1015,8 +1015,8 @@ void Sequence::HandleXMLEndTag(const wxChar *tag)
|
||||
wxLogWarning(
|
||||
wxT("Gap detected in project file. Correcting sequence sample count from %s to %s."),
|
||||
// PRL: Why bother with Internat when the above is just wxT?
|
||||
Internat::ToString(mNumSamples.as_double(), 0).c_str(),
|
||||
Internat::ToString(numSamples.as_double(), 0).c_str());
|
||||
Internat::ToString(mNumSamples.as_double(), 0),
|
||||
Internat::ToString(numSamples.as_double(), 0));
|
||||
mNumSamples = numSamples;
|
||||
mErrorOpening = true;
|
||||
}
|
||||
@@ -1061,7 +1061,7 @@ void Sequence::WriteXML(XMLWriter &xmlFile) const
|
||||
wxString sMsg =
|
||||
wxString::Format(
|
||||
_("Sequence has block file exceeding maximum %s samples per block.\nTruncating to this maximum length."),
|
||||
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0).c_str());
|
||||
Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0));
|
||||
AudacityMessageBox(sMsg, _("Warning - Truncating Overlong Block File"), wxICON_EXCLAMATION | wxOK);
|
||||
wxLogWarning(sMsg);
|
||||
bb.f->SetLength(mMaxSamples);
|
||||
@@ -1908,7 +1908,7 @@ void Sequence::ConsistencyCheck
|
||||
ex.GetLine(), whereStr);
|
||||
wxString str;
|
||||
DebugPrintf(mBlock, mNumSamples, &str);
|
||||
wxLogError(wxT("%s"), str.c_str());
|
||||
wxLogError(wxT("%s"), str);
|
||||
wxLogError(wxT("*** Please report this error to https://forum.audacityteam.org/. ***\n\n")
|
||||
wxT("Recommended course of action:\n")
|
||||
wxT("Undo the failed operation(s), then export or save your work and quit."));
|
||||
|
||||
Reference in New Issue
Block a user