[Xfce4-commits] [panel-plugins/xfce4-whiskermenu-plugin] 21/473: Remove use of C++11 emplace.
noreply at xfce.org
noreply at xfce.org
Mon Feb 16 23:53:11 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 798b42a237ea6d49bfabcc4bcc106cf55bedc203
Author: Graeme Gott <graeme at gottcode.org>
Date: Mon Jun 24 10:36:22 2013 -0400
Remove use of C++11 emplace.
Necessary for GCC 4.6 to compile it.
---
src/applications_page.cpp | 6 +++---
src/list_page.cpp | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/applications_page.cpp b/src/applications_page.cpp
index b3f2bf1..86f5b9d 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.emplace(std::move(key), new Launcher(menu_item)).first;
+ iter = page->m_items.insert(std::make_pair(std::move(key), new Launcher(menu_item))).first;
}
// Add menu item to current category
@@ -296,7 +296,7 @@ void ApplicationsPage::reload_categories()
// Add button for all applications
GtkRadioButton* all_button = new_section_button("applications-other", _("All"));
g_signal_connect(all_button, "toggled", SLOT_CALLBACK(ApplicationsPage::apply_filter), this);
- m_category_buttons.emplace(all_button, nullptr);
+ m_category_buttons[all_button] = nullptr;
category_buttons.push_back(all_button);
// Create sorted list of categories
@@ -313,7 +313,7 @@ void ApplicationsPage::reload_categories()
{
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.emplace(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 5cea9c1..2f39c0a 100644
--- a/src/list_page.cpp
+++ b/src/list_page.cpp
@@ -163,11 +163,11 @@ void ListPage::on_row_inserted(GtkTreeModel* model, GtkTreePath* path, GtkTreeIt
if (pos >= m_desktop_ids.size())
{
- m_desktop_ids.emplace_back(std::move(desktop_id));
+ m_desktop_ids.push_back(std::move(desktop_id));
}
else if (m_desktop_ids.at(pos) != desktop_id)
{
- m_desktop_ids.emplace(m_desktop_ids.begin() + pos, std::move(desktop_id));
+ m_desktop_ids.insert(m_desktop_ids.begin() + pos, std::move(desktop_id));
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list