1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 17:11:12 +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:
Paul Licameli
2019-02-28 08:54:36 -05:00
parent dd8eb9e3d9
commit 795b6a2e42
22 changed files with 62 additions and 57 deletions

View File

@@ -48,14 +48,14 @@ void FileHistory::AddFileToHistory(const wxString & file, bool update)
#endif
if (i != wxNOT_FOUND) {
mHistory.RemoveAt(i);
mHistory.erase( mHistory.begin() + i );
}
if (mMaxFiles == mHistory.size()) {
mHistory.RemoveAt(mHistory.size() - 1);
if (mMaxFiles > 0 && mMaxFiles == mHistory.size()) {
mHistory.erase( mHistory.end() - 1 );
}
mHistory.Insert(file, 0);
mHistory.insert(mHistory.begin(), file);
if (update) {
AddFilesToMenu();
@@ -67,7 +67,7 @@ void FileHistory::RemoveFileFromHistory(size_t i, bool update)
wxASSERT(i < mHistory.size());
if (i < mHistory.size()) {
mHistory.RemoveAt(i);
mHistory.erase( mHistory.begin() + i );
if (update) {
AddFilesToMenu();

View File

@@ -778,9 +778,9 @@ KeyView::RefreshLines(bool bSort)
// For the Key View, if the filter is a single character,
// then it has to be the last character in the searchit string,
// and be preceded by nothing or +.
if ((mViewType == ViewByKey) &&
if ((mViewType == ViewByKey) &&
(mFilter.length() == 1) &&
(!mFilter.IsSameAs(searchit.Last()) ||
(mFilter != searchit.Last() ||
((searchit.length() > 1) &&
((wxString)(searchit.GetChar(searchit.length() - 2)) != wxT("+")))))
{