1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

Get rid of wx object arrays, use std::vector

This commit is contained in:
Paul Licameli
2018-02-02 13:24:53 -05:00
parent 89d8f0df63
commit 080dd34e61
56 changed files with 350 additions and 497 deletions

View File

@@ -480,9 +480,6 @@ enum FieldTypes
FT_Name // type, name length, name
};
#include <wx/arrimpl.cpp>
WX_DEFINE_OBJARRAY(IdMapArray);
AutoSaveFile::AutoSaveFile(size_t allocSize)
{
mAllocSize = allocSize;
@@ -762,7 +759,7 @@ bool AutoSaveFile::Decode(const wxString & fileName)
XMLFileWriter out{ fileName, _("Error Decoding File") };
IdMap mIds;
IdMapArray mIdStack;
std::vector<IdMap> mIdStack;
mIds.clear();
@@ -774,15 +771,15 @@ bool AutoSaveFile::Decode(const wxString & fileName)
{
case FT_Push:
{
mIdStack.Add(mIds);
mIdStack.push_back(mIds);
mIds.clear();
}
break;
case FT_Pop:
{
mIds = mIdStack[mIdStack.GetCount() - 1];
mIdStack.RemoveAt(mIdStack.GetCount() - 1);
mIds = mIdStack.back();
mIdStack.pop_back();
}
break;