From bb1f833d02726eafc75590b7b2957f36d9cbaf78 Mon Sep 17 00:00:00 2001 From: f4exb Date: Sat, 4 Dec 2021 10:54:19 +0100 Subject: [PATCH] MainWindow: use pop_back() to remove last element of vector --- sdrgui/mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sdrgui/mainwindow.cpp b/sdrgui/mainwindow.cpp index 0e1cbf012..18a4ce2ba 100644 --- a/sdrgui/mainwindow.cpp +++ b/sdrgui/mainwindow.cpp @@ -683,7 +683,7 @@ void MainWindow::removeFeatureSet(unsigned int tabIndex) if (tabIndex < m_featureUIs.size()) { delete m_featureUIs[tabIndex]; - m_featureUIs.erase(m_featureUIs.begin() + tabIndex); + m_featureUIs.pop_back(); m_mainCore->removeFeatureSet(tabIndex); } } @@ -693,7 +693,8 @@ void MainWindow::removeAllFeatureSets() while (m_featureUIs.size() > 0) { delete m_featureUIs.back(); - m_featureUIs.erase(std::prev(m_featureUIs.end())); + m_featureUIs.pop_back(); + m_mainCore->removeLastFeatureSet(); } }