[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 02/06: Remove duplicate bounds check.
noreply at xfce.org
noreply at xfce.org
Wed Jan 22 21:48:22 CET 2020
This is an automated email from the git hooks/post-receive script.
g o t t c o d e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository panel-plugins/xfce4-whiskermenu-plugin.
commit a2894582bc9aef9687ee563340b45423110546a7
Author: Graeme Gott <graeme at gottcode.org>
Date: Tue Jan 21 08:43:18 2020 -0500
Remove duplicate bounds check.
---
panel-plugin/category.cpp | 8 ++++----
panel-plugin/favorites-page.cpp | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/panel-plugin/category.cpp b/panel-plugin/category.cpp
index e096264..6cc94b7 100644
--- a/panel-plugin/category.cpp
+++ b/panel-plugin/category.cpp
@@ -180,7 +180,7 @@ void Category::insert_items(GtkTreeStore* model, GtkTreeIter* parent)
{
for (std::vector<Element*>::size_type i = 0, end = m_items.size(); i < end; ++i)
{
- Element* element = m_items.at(i);
+ Element* element = m_items[i];
if (Category* category = dynamic_cast<Category*>(element))
{
if (category->empty())
@@ -231,7 +231,7 @@ void Category::insert_items(GtkListStore* model)
{
for (std::vector<Element*>::size_type i = 0, end = m_items.size(); i < end; ++i)
{
- Element* element = m_items.at(i);
+ Element* element = m_items[i];
if (Launcher* launcher = dynamic_cast<Launcher*>(element))
{
gtk_list_store_insert_with_values(model,
@@ -279,7 +279,7 @@ void Category::merge()
std::vector<Element*>::size_type count = m_items.size();
for (std::vector<Category*>::size_type i = 0; i < categories.size(); ++i)
{
- Category* category = categories.at(i);
+ Category* category = categories[i];
count += category->m_items.size();
for (std::vector<Element*>::const_iterator j = category->m_items.begin(), end = category->m_items.end(); j != end; ++j)
@@ -310,7 +310,7 @@ void Category::merge()
// Delete direct subcategories; they will recursively delete their subcategories
for (std::vector<Category*>::size_type i = 0; i < last_direct; ++i)
{
- delete categories.at(i);
+ delete categories[i];
}
m_has_subcategories = false;
diff --git a/panel-plugin/favorites-page.cpp b/panel-plugin/favorites-page.cpp
index b22a6f6..717cab1 100644
--- a/panel-plugin/favorites-page.cpp
+++ b/panel-plugin/favorites-page.cpp
@@ -203,7 +203,7 @@ void FavoritesPage::on_row_inserted(GtkTreeModel* model, GtkTreePath* path, GtkT
wm_settings->favorites.push_back(desktop_id);
wm_settings->set_modified();
}
- else if (wm_settings->favorites.at(pos) != desktop_id)
+ else if (wm_settings->favorites[pos] != desktop_id)
{
wm_settings->favorites.insert(wm_settings->favorites.begin() + pos, desktop_id);
wm_settings->set_modified();
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list