1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-16 07:47:58 +01:00

Use standard library style members of wxArrayString (and wxString) ...

... which will make it easier to change the types of those containers to
std::vectors of other string-like classes

for wxString,

IsEmpty => empty
Clear => clear
Alloc => reserve

for wxArrayString,

Count => size
GetCount => size
IsEmpty => empty
Add => push_back
Clear => clear
Empty => clear
Sort => std::sort (only with default comparator)
SetCount => resize
Last => back
Item => operator []
Alloc => reserve
This commit is contained in:
Paul Licameli
2019-02-11 19:10:48 -05:00
parent 5daa67dfe6
commit 2db49dc1f0
115 changed files with 728 additions and 728 deletions

View File

@@ -83,25 +83,25 @@ enum {
void SpectrumPrefs::Populate(size_t windowSize)
{
mSizeChoices.Add(_("8 - most wideband"));
mSizeChoices.Add(wxT("16"));
mSizeChoices.Add(wxT("32"));
mSizeChoices.Add(wxT("64"));
mSizeChoices.Add(wxT("128"));
mSizeChoices.Add(wxT("256"));
mSizeChoices.Add(wxT("512"));
mSizeChoices.Add(_("1024 - default"));
mSizeChoices.Add(wxT("2048"));
mSizeChoices.Add(wxT("4096"));
mSizeChoices.Add(wxT("8192"));
mSizeChoices.Add(wxT("16384"));
mSizeChoices.Add(_("32768 - most narrowband"));
mSizeChoices.push_back(_("8 - most wideband"));
mSizeChoices.push_back(wxT("16"));
mSizeChoices.push_back(wxT("32"));
mSizeChoices.push_back(wxT("64"));
mSizeChoices.push_back(wxT("128"));
mSizeChoices.push_back(wxT("256"));
mSizeChoices.push_back(wxT("512"));
mSizeChoices.push_back(_("1024 - default"));
mSizeChoices.push_back(wxT("2048"));
mSizeChoices.push_back(wxT("4096"));
mSizeChoices.push_back(wxT("8192"));
mSizeChoices.push_back(wxT("16384"));
mSizeChoices.push_back(_("32768 - most narrowband"));
wxASSERT(mSizeChoices.size() == SpectrogramSettings::NumWindowSizes);
PopulatePaddingChoices(windowSize);
for (int i = 0; i < NumWindowFuncs(); i++) {
mTypeChoices.Add(WindowFuncName(i));
mTypeChoices.push_back(WindowFuncName(i));
}
mScaleChoices = SpectrogramSettings::GetScaleNames();
@@ -140,7 +140,7 @@ void SpectrumPrefs::PopulatePaddingChoices(size_t windowSize)
const size_t maxWindowSize = 1 << (SpectrogramSettings::LogMaxWindowSize);
while (windowSize <= maxWindowSize) {
const wxString numeral = wxString::Format(wxT("%d"), padding);
mZeroPaddingChoices.Add(numeral);
mZeroPaddingChoices.push_back(numeral);
if (pPaddingSizeControl)
pPaddingSizeControl->Append(numeral);
windowSize <<= 1;