From c7fff2816e8dc1131c8cbc770aab90a23e59dd13 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 10 Jul 2020 11:48:09 -0400 Subject: [PATCH] CResourceTableModel: Make use of push_back --- src/Editor/ResourceBrowser/CResourceTableModel.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Editor/ResourceBrowser/CResourceTableModel.cpp b/src/Editor/ResourceBrowser/CResourceTableModel.cpp index a89c856a..650d95b0 100644 --- a/src/Editor/ResourceBrowser/CResourceTableModel.cpp +++ b/src/Editor/ResourceBrowser/CResourceTableModel.cpp @@ -138,9 +138,9 @@ QMimeData* CResourceTableModel::mimeData(const QModelIndexList& rkIndexes) const CVirtualDirectory *pDir = IndexDirectory(Index); if (pEntry) - Resources << pEntry; + Resources.push_back(pEntry); else - Dirs << pDir; + Dirs.push_back(pDir); } return new CResourceMimeData(Resources, Dirs); @@ -181,7 +181,7 @@ QModelIndex CResourceTableModel::GetIndexForDirectory(CVirtualDirectory *pDir) c CResourceEntry* CResourceTableModel::IndexEntry(const QModelIndex& rkIndex) const { - int Index = rkIndex.row() - mDirectories.size(); + const int Index = rkIndex.row() - mDirectories.size(); return (Index >= 0 ? mEntries[Index] : nullptr); } @@ -227,7 +227,7 @@ void CResourceTableModel::FillEntryList(CVirtualDirectory *pDir, bool AssetListM if (!pEntry->IsHidden()) { - int Index = EntryListIndex(pEntry); + const int Index = EntryListIndex(pEntry); mEntries.insert(Index, pEntry); } } @@ -299,7 +299,7 @@ void CResourceTableModel::CheckAddResource(CResourceEntry *pEntry) // Append to the end, let the proxy handle sorting const int NumRows = mDirectories.size() + mEntries.size(); beginInsertRows(QModelIndex(), NumRows, NumRows); - mEntries << pEntry; + mEntries.push_back(pEntry); endInsertRows(); } } @@ -324,7 +324,7 @@ void CResourceTableModel::CheckAddDirectory(CVirtualDirectory *pDir) // Just append to the end, let the proxy handle sorting beginInsertRows(QModelIndex(), mDirectories.size(), mDirectories.size()); - mDirectories << pDir; + mDirectories.push_back(pDir); endInsertRows(); }