mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-13 14:13:32 +02:00
More std:: style for wxString and wxArrayString...
... Replacing: Insert => insert RemoveAt => erase Remove => erase IsSameAs => operator == or operator != (but only when second argument was true or default)
This commit is contained in:
@@ -236,7 +236,9 @@ void Importer::ReadImportItems()
|
||||
int index = new_item->divider;
|
||||
if (new_item->divider < 0)
|
||||
index = new_item->filters.size();
|
||||
new_item->filters.Insert(importPlugin->GetPluginStringID(),index);
|
||||
new_item->filters.insert(
|
||||
new_item->filters.begin() + index,
|
||||
importPlugin->GetPluginStringID());
|
||||
new_item->filter_objects.insert(
|
||||
new_item->filter_objects.begin() + index, importPlugin.get());
|
||||
if (new_item->divider >= 0)
|
||||
@@ -454,7 +456,7 @@ bool Importer::Import(const wxString &fName,
|
||||
// in case subsequent code revisions to the constructor should break this assumption that
|
||||
// libsndfile is first.
|
||||
ImportPlugin *libsndfilePlugin = mImportPluginList.begin()->get();
|
||||
wxASSERT(libsndfilePlugin->GetPluginStringID().IsSameAs(wxT("libsndfile")));
|
||||
wxASSERT(libsndfilePlugin->GetPluginStringID() == wxT("libsndfile"));
|
||||
|
||||
for (const auto &plugin : mImportPluginList)
|
||||
{
|
||||
@@ -472,7 +474,7 @@ bool Importer::Import(const wxString &fName,
|
||||
// but then get processed as desired by libmad.
|
||||
// But a wav file which bears an incorrect .mp3 extension will be successfully
|
||||
// processed by libsndfile and thus avoid being submitted to libmad.
|
||||
if (plugin->GetPluginStringID().IsSameAs(wxT("libmad")))
|
||||
if (plugin->GetPluginStringID() == wxT("libmad"))
|
||||
{
|
||||
// Make sure libsndfile is not already in the list
|
||||
if (importPlugins.end() ==
|
||||
@@ -494,7 +496,7 @@ bool Importer::Import(const wxString &fName,
|
||||
// formats unsuitable for it, and produce distorted results.
|
||||
for (const auto &plugin : mImportPluginList)
|
||||
{
|
||||
if (!(plugin->GetPluginStringID().IsSameAs(wxT("libmad"))))
|
||||
if (!(plugin->GetPluginStringID() == wxT("libmad")))
|
||||
{
|
||||
// Make sure its not already in the list
|
||||
if (importPlugins.end() ==
|
||||
|
@@ -344,7 +344,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
||||
}
|
||||
} // End if statement
|
||||
|
||||
if (tokenholder.IsSameAs(wxT("#")))
|
||||
if (tokenholder == wxT("#"))
|
||||
{
|
||||
// # indicates comments; ignore line
|
||||
tok = wxStringTokenizer(wxT(""), wxT(" "));
|
||||
@@ -399,7 +399,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
||||
{
|
||||
tokenholder = tok.GetNextToken();
|
||||
|
||||
if (tokenholder.IsSameAs(wxT("#")))
|
||||
if (tokenholder == wxT("#"))
|
||||
{
|
||||
// # indicates comments; ignore line
|
||||
tok = wxStringTokenizer(wxT(""), wxT(" "));
|
||||
@@ -453,7 +453,7 @@ void LOFImportFileHandle::lofOpenFiles(wxString* ln)
|
||||
} // End if statement (more tokens after file name)
|
||||
} // End if statement "file" lines
|
||||
|
||||
else if (tokenholder.IsSameAs(wxT("#")))
|
||||
else if (tokenholder == wxT("#"))
|
||||
{
|
||||
// # indicates comments; ignore line
|
||||
tok = wxStringTokenizer(wxT(""), wxT(" "));
|
||||
|
Reference in New Issue
Block a user