From c5fe5327f93355f409a3f8c8e27c3f12ea856559 Mon Sep 17 00:00:00 2001 From: Joel Klinghed Date: Sat, 29 Jul 2017 20:50:55 +0200 Subject: Fix compilation on older G++/libc++ with broken unordered_map.emplace --- src/gui_gtk.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/gui_gtk.cc') diff --git a/src/gui_gtk.cc b/src/gui_gtk.cc index 574cf84..e80a249 100644 --- a/src/gui_gtk.cc +++ b/src/gui_gtk.cc @@ -2042,7 +2042,7 @@ std::string GtkGuiMenu::add_action(std::string const& id) { if (parent_) return parent_->add_action(id); std::string name = escape(id); auto action = g_simple_action_new(name.c_str(), nullptr); - action_.emplace(id, action); + action_[id].reset(action); g_signal_connect(action, "activate", G_CALLBACK(menu_item_activate), this); if (map_) g_action_map_add_action(map_, G_ACTION(action)); return "app." + name; @@ -2066,7 +2066,7 @@ public: auto handle = new Fd(channel, callback); handle->watch_ = g_io_add_watch(channel, events2cond(events), &GtkLooper::event, handle); - fds_.emplace(fd, handle); + fds_[fd].reset(handle); } void modify(int fd, uint8_t events) override { -- cgit v1.2.3-70-g09d2