[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 29/473: Remove rvalue references.

noreply at xfce.org noreply at xfce.org
Mon Feb 16 23:53:19 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 dd0727759bfaa08a435bb7bd5d0fa5bb301cdc9a
Author: Graeme Gott <graeme at gottcode.org>
Date:   Wed Jun 26 14:57:44 2013 -0400

    Remove rvalue references.
    
    Downgrade to C++98.
---
 src/applications_page.cpp |    2 +-
 src/launcher.hpp          |    1 -
 src/launcher_model.hpp    |    1 -
 src/list_page.cpp         |    8 ++++----
 src/list_page.hpp         |    4 ++--
 src/menu.cpp              |    4 ++--
 src/menu.hpp              |    4 ++--
 src/panel_plugin.cpp      |    2 +-
 src/panel_plugin.hpp      |    2 +-
 9 files changed, 13 insertions(+), 15 deletions(-)

diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index fc91a5e..af5132d 100644
--- a/src/applications_page.cpp
+++ b/src/applications_page.cpp
@@ -274,7 +274,7 @@ void ApplicationsPage::load_menu_item(const gchar* desktop_id, GarconMenuItem* m
 	auto iter = page->m_items.find(key);
 	if (iter == page->m_items.end())
 	{
-		iter = page->m_items.insert(std::make_pair(std::move(key), new Launcher(menu_item))).first;
+		iter = page->m_items.insert(std::make_pair(key, new Launcher(menu_item))).first;
 	}
 
 	// Add menu item to current category
diff --git a/src/launcher.hpp b/src/launcher.hpp
index 52059e1..dc918d0 100644
--- a/src/launcher.hpp
+++ b/src/launcher.hpp
@@ -59,7 +59,6 @@ public:
 	static void set_show_description(bool show);
 
 private:
-	Launcher(Launcher&& launcher)=delete;
 	Launcher(const Launcher& launcher)=delete;
 	Launcher& operator=(const Launcher& launcher)=delete;
 
diff --git a/src/launcher_model.hpp b/src/launcher_model.hpp
index 75b525f..f5361c0 100644
--- a/src/launcher_model.hpp
+++ b/src/launcher_model.hpp
@@ -65,7 +65,6 @@ public:
 
 private:
 	LauncherModel(const LauncherModel &model)=delete;
-	LauncherModel(LauncherModel &&model)=delete;
 	LauncherModel & operator=(const LauncherModel &model)=delete;
 
 private:
diff --git a/src/list_page.cpp b/src/list_page.cpp
index 8489d42..fe98a4d 100644
--- a/src/list_page.cpp
+++ b/src/list_page.cpp
@@ -45,7 +45,7 @@ static std::vector<std::string> read_list(XfceRc* rc, const gchar* key, std::vec
 
 //-----------------------------------------------------------------------------
 
-ListPage::ListPage(XfceRc* rc, const gchar* key, std::vector<std::string> default_desktop_ids, Menu* menu) :
+ListPage::ListPage(XfceRc* rc, const gchar* key, const std::vector<std::string>& default_desktop_ids, Menu* menu) :
 	Page(menu),
 	m_key(key),
 	m_desktop_ids(read_list(rc, key, default_desktop_ids))
@@ -94,7 +94,7 @@ void ListPage::save(XfceRc* settings)
 
 //-----------------------------------------------------------------------------
 
-void ListPage::set_menu_items(std::map<std::string, Launcher*> items)
+void ListPage::set_menu_items(const std::map<std::string, Launcher*>& items)
 {
 	// Create new model for treeview
 	LauncherModel model;
@@ -163,11 +163,11 @@ void ListPage::on_row_inserted(GtkTreeModel* model, GtkTreePath* path, GtkTreeIt
 
 	if (pos >= m_desktop_ids.size())
 	{
-		m_desktop_ids.push_back(std::move(desktop_id));
+		m_desktop_ids.push_back(desktop_id);
 	}
 	else if (m_desktop_ids.at(pos) != desktop_id)
 	{
-		m_desktop_ids.insert(m_desktop_ids.begin() + pos, std::move(desktop_id));
+		m_desktop_ids.insert(m_desktop_ids.begin() + pos, desktop_id);
 	}
 }
 
diff --git a/src/list_page.hpp b/src/list_page.hpp
index a761ed7..cfb25a4 100644
--- a/src/list_page.hpp
+++ b/src/list_page.hpp
@@ -38,7 +38,7 @@ class LauncherView;
 class ListPage : public Page
 {
 public:
-	ListPage(XfceRc* settings, const gchar* key, std::vector<std::string> default_desktop_ids, Menu* menu);
+	ListPage(XfceRc* settings, const gchar* key, const std::vector<std::string>& default_desktop_ids, Menu* menu);
 	~ListPage();
 
 	bool contains(Launcher* launcher) const;
@@ -50,7 +50,7 @@ public:
 	virtual void add(Launcher* launcher)=0;
 	void remove(Launcher* launcher);
 	void save(XfceRc* settings);
-	void set_menu_items(std::map<std::string, Launcher*> items);
+	void set_menu_items(const std::map<std::string, Launcher*>& items);
 	void unset_menu_items();
 
 private:
diff --git a/src/menu.cpp b/src/menu.cpp
index 9678ee8..d9e11a9 100644
--- a/src/menu.cpp
+++ b/src/menu.cpp
@@ -402,7 +402,7 @@ void Menu::save(XfceRc* settings)
 
 //-----------------------------------------------------------------------------
 
-void Menu::set_categories(std::vector<GtkRadioButton*> categories)
+void Menu::set_categories(const std::vector<GtkRadioButton*>& categories)
 {
 	for (const auto& i : categories)
 	{
@@ -417,7 +417,7 @@ void Menu::set_categories(std::vector<GtkRadioButton*> categories)
 
 //-----------------------------------------------------------------------------
 
-void Menu::set_items(std::map<std::string, Launcher*> items)
+void Menu::set_items(const std::map<std::string, Launcher*>& items)
 {
 	m_search_results->set_menu_items(m_applications->get_model());
 	m_favorites->set_menu_items(items);
diff --git a/src/menu.hpp b/src/menu.hpp
index 6dc9d87..5a56e6f 100644
--- a/src/menu.hpp
+++ b/src/menu.hpp
@@ -73,8 +73,8 @@ public:
 	void hide();
 	void show(GtkWidget* parent, bool horizontal);
 	void save(XfceRc* settings);
-	void set_categories(std::vector<GtkRadioButton*> categories);
-	void set_items(std::map<std::string, Launcher*> items);
+	void set_categories(const std::vector<GtkRadioButton*>& categories);
+	void set_items(const std::map<std::string, Launcher*>& items);
 	void unset_items();
 
 private:
diff --git a/src/panel_plugin.cpp b/src/panel_plugin.cpp
index c454f29..4c7a2fb 100644
--- a/src/panel_plugin.cpp
+++ b/src/panel_plugin.cpp
@@ -106,7 +106,7 @@ void PanelPlugin::reload()
 
 //-----------------------------------------------------------------------------
 
-void PanelPlugin::set_button_icon_name(std::string icon)
+void PanelPlugin::set_button_icon_name(const std::string& icon)
 {
 	m_button_icon_name = icon;
 	xfce_panel_image_set_from_source(m_button_icon, icon.c_str());
diff --git a/src/panel_plugin.hpp b/src/panel_plugin.hpp
index d2fc180..e556b22 100644
--- a/src/panel_plugin.hpp
+++ b/src/panel_plugin.hpp
@@ -49,7 +49,7 @@ public:
 	}
 
 	void reload();
-	void set_button_icon_name(std::string icon);
+	void set_button_icon_name(const std::string& icon);
 	void set_configure_enabled(bool enabled);
 
 private:

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


More information about the Xfce4-commits mailing list