[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 33/473: Remove automatically detected types.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:53:23 CET 2015


This is an automated email from the git hooks/post-receive script.

gottcode pushed a commit to branch master
in repository panel-plugins/xfce4-whiskermenu-plugin.

commit f8a9936362e298e3cb5d0bf5fedd41425c425437
Author: Graeme Gott <graeme at gottcode.org>
Date:   Wed Jun 26 15:23:26 2013 -0400

    Remove automatically detected types.
    
    Downgrade to C++98.
---
 src/applications_page.cpp |   44 ++++++++++++++++++++++----------------------
 src/list_page.cpp         |    8 ++++----
 src/menu.cpp              |    8 ++++----
 src/resizer_widget.cpp    |    4 ++--
 4 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index 7f9186d..fd45561 100644
--- a/src/applications_page.cpp
+++ b/src/applications_page.cpp
@@ -75,7 +75,7 @@ ApplicationsPage::~ApplicationsPage()
 void ApplicationsPage::apply_filter(GtkToggleButton* togglebutton)
 {
 	// Find category matching button
-	auto i = m_category_buttons.find(GTK_RADIO_BUTTON(togglebutton));
+	std::map<GtkRadioButton*, Category*>::const_iterator i = m_category_buttons.find(GTK_RADIO_BUTTON(togglebutton));
 	if (i == m_category_buttons.end())
 	{
 		return;
@@ -109,7 +109,7 @@ bool ApplicationsPage::on_filter(GtkTreeModel* model, GtkTreeIter* iter)
 	Launcher* launcher = NULL;
 	gtk_tree_model_get(model, iter, LauncherModel::COLUMN_LAUNCHER, &launcher, -1);
 
-	auto category = m_categories[m_current_category];
+	const std::vector<Launcher*>& category = m_categories[m_current_category];
 	return std::find(category.begin(), category.end(), launcher) != category.end();
 }
 
@@ -131,18 +131,18 @@ void ApplicationsPage::reload_applications()
 
 	// Create sorted list of menu items
 	std::map<std::string, Launcher*> sorted_items;
-	for (const auto& i : m_items)
+	for (std::map<std::string, Launcher*>::const_iterator i = m_items.begin(), end = m_items.end(); i != end; ++i)
 	{
-		gchar* collation_key = g_utf8_collate_key(i.second->get_text(), -1);
-		sorted_items[collation_key] = i.second;
+		gchar* collation_key = g_utf8_collate_key(i->second->get_text(), -1);
+		sorted_items[collation_key] = i->second;
 		g_free(collation_key);
 	}
 
 	// Add all items to model
 	LauncherModel model;
-	for (const auto& i : sorted_items)
+	for (std::map<std::string, Launcher*>::const_iterator i = sorted_items.begin(), end = sorted_items.end(); i != end; ++i)
 	{
-		model.append_item(i.second);
+		model.append_item(i->second);
 	}
 
 	// Create filter model and pass ownership to view, do not delete!
@@ -160,18 +160,18 @@ void ApplicationsPage::reload_applications()
 void ApplicationsPage::clear_applications()
 {
 	// Free categories
-	for (auto& i : m_category_buttons)
+	for (std::map<GtkRadioButton*, Category*>::iterator i = m_category_buttons.begin(), end = m_category_buttons.end(); i != end; ++i)
 	{
-		if (GTK_IS_WIDGET(i.first))
+		if (GTK_IS_WIDGET(i->first))
 		{
-			gtk_widget_destroy(GTK_WIDGET(i.first));
+			gtk_widget_destroy(GTK_WIDGET(i->first));
 		}
 	}
 	m_category_buttons.clear();
 
-	for (auto& i : m_categories)
+	for (std::map<Category*, std::vector<Launcher*> >::iterator i = m_categories.begin(), end = m_categories.end(); i != end; ++i)
 	{
-		delete i.first;
+		delete i->first;
 	}
 	m_categories.clear();
 
@@ -179,9 +179,9 @@ void ApplicationsPage::clear_applications()
 	get_menu()->unset_items();
 	unset_model();
 
-	for (auto& i : m_items)
+	for (std::map<std::string, Launcher*>::iterator i = m_items.begin(), end = m_items.end(); i != end; ++i)
 	{
-		delete i.second;
+		delete i->second;
 	}
 	m_items.clear();
 
@@ -241,7 +241,7 @@ void ApplicationsPage::load_menu(GarconMenu* menu)
 	if (first_level)
 	{
 		// Free unused categories
-		auto i = m_categories.find(m_current_category);
+		std::map<Category*, std::vector<Launcher*> >::iterator i = m_categories.find(m_current_category);
 		if (i == m_categories.end())
 		{
 			delete m_current_category;
@@ -271,7 +271,7 @@ void ApplicationsPage::load_menu_item(const gchar* desktop_id, GarconMenuItem* m
 
 	// Add to map
 	std::string key(desktop_id);
-	auto iter = page->m_items.find(key);
+	std::map<std::string, Launcher*>::iterator iter = page->m_items.find(key);
 	if (iter == page->m_items.end())
 	{
 		iter = page->m_items.insert(std::make_pair(key, new Launcher(menu_item))).first;
@@ -301,19 +301,19 @@ void ApplicationsPage::reload_categories()
 
 	// Create sorted list of categories
 	std::map<std::string, Category*> sorted_categories;
-	for (const auto& i : m_categories)
+	for (std::map<Category*, std::vector<Launcher*> >::const_iterator i = m_categories.begin(), end = m_categories.end(); i != end; ++i)
 	{
-		gchar* collation_key = g_utf8_collate_key(i.first->get_text(), -1);
-		sorted_categories[collation_key] = i.first;
+		gchar* collation_key = g_utf8_collate_key(i->first->get_text(), -1);
+		sorted_categories[collation_key] = i->first;
 		g_free(collation_key);
 	}
 
 	// Add buttons for sorted categories
-	for (const auto& i : sorted_categories)
+	for (std::map<std::string, Category*>::const_iterator i = sorted_categories.begin(), end = sorted_categories.end(); i != end; ++i)
 	{
-		GtkRadioButton* category_button = new_section_button(i.second->get_icon(), i.second->get_text());
+		GtkRadioButton* category_button = new_section_button(i->second->get_icon(), i->second->get_text());
 		g_signal_connect(category_button, "toggled", SLOT_CALLBACK(ApplicationsPage::apply_filter), this);
-		m_category_buttons[category_button] = i.second;
+		m_category_buttons[category_button] = i->second;
 		category_buttons.push_back(category_button);
 	}
 
diff --git a/src/list_page.cpp b/src/list_page.cpp
index dce162c..4886b0c 100644
--- a/src/list_page.cpp
+++ b/src/list_page.cpp
@@ -81,13 +81,13 @@ void ListPage::save(XfceRc* settings)
 {
 	// Save list
 	std::string desktop_ids;
-	for (const auto& desktop_id : m_desktop_ids)
+	for (std::vector<std::string>::const_iterator i = m_desktop_ids.begin(), end = m_desktop_ids.end(); i != end; ++i)
 	{
 		if (!desktop_ids.empty())
 		{
 			desktop_ids += ",";
 		}
-		desktop_ids += desktop_id;
+		desktop_ids += *i;
 	}
 	xfce_rc_write_entry(settings, m_key, desktop_ids.c_str());
 }
@@ -100,9 +100,9 @@ void ListPage::set_menu_items(const std::map<std::string, Launcher*>& items)
 	LauncherModel model;
 
 	// Fetch menu items or remove them from list if missing
-	for (auto i = m_desktop_ids.begin(); i != m_desktop_ids.end(); ++i)
+	for (std::vector<std::string>::iterator i = m_desktop_ids.begin(); i != m_desktop_ids.end(); ++i)
 	{
-		auto item = items.find(*i);
+		std::map<std::string, Launcher*>::const_iterator item = items.find(*i);
 		if (item != items.end())
 		{
 			model.append_item(item->second);
diff --git a/src/menu.cpp b/src/menu.cpp
index 0820e48..4cd3ab2 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -408,11 +408,11 @@ void Menu::save(XfceRc* settings)
 
 void Menu::set_categories(const std::vector<GtkRadioButton*>& categories)
 {
-	for (const auto& i : categories)
+	for (std::vector<GtkRadioButton*>::const_iterator i = categories.begin(), end = categories.end(); i != end; ++i)
 	{
-		gtk_radio_button_set_group(i, gtk_radio_button_get_group(m_recent_button));
-		gtk_box_pack_start(m_sidebar_box, GTK_WIDGET(i), false, false, 0);
-		g_signal_connect_swapped(i, "toggled", SLOT_CALLBACK(Menu::category_toggled), this);
+		gtk_radio_button_set_group(*i, gtk_radio_button_get_group(m_recent_button));
+		gtk_box_pack_start(m_sidebar_box, GTK_WIDGET(*i), false, false, 0);
+		g_signal_connect_swapped(*i, "toggled", SLOT_CALLBACK(Menu::category_toggled), this);
 	}
 	gtk_widget_show_all(GTK_WIDGET(m_sidebar_box));
 
diff --git a/src/resizer_widget.cpp b/src/resizer_widget.cpp
index 2b57302..cb48a80 100644
--- a/src/resizer_widget.cpp
+++ b/src/resizer_widget.cpp
@@ -138,9 +138,9 @@ gboolean ResizerWidget::on_expose_event(GtkWidget* widget, GdkEventExpose*)
 	cairo_set_source_rgb(cr, color.red / 65535.0, color.green / 65535.0, color.blue / 65535.0);
 
 	cairo_move_to(cr, m_shape.back().x, m_shape.back().y);
-	for (const GdkPoint& point : m_shape)
+	for (std::vector<GdkPoint>::const_iterator point = m_shape.begin(), end = m_shape.end(); point != end; ++point)
 	{
-		cairo_line_to(cr, point.x, point.y);
+		cairo_line_to(cr, point->x, point->y);
 	}
 	cairo_fill(cr);
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list