From e1cb749aab3c773073b1adde1b4cd07b2a6ce93e Mon Sep 17 00:00:00 2001 From: Jan Lingscheid Date: Tue, 17 Oct 2017 08:31:32 +0200 Subject: Replace boost::shared_ptr Replace boost::shared_ptr with C++11 smartpointer and remove the boost/shared_ptr.hpp header. --- src/event-log.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'src/event-log.cpp') diff --git a/src/event-log.cpp b/src/event-log.cpp index 5a73b649e..41ab2f2d0 100644 --- a/src/event-log.cpp +++ b/src/event-log.cpp @@ -12,8 +12,6 @@ #include "event-log.h" #include -#include -#include #include "desktop.h" #include "inkscape.h" @@ -60,9 +58,9 @@ public: Inkscape::EventLog::CallbackMap *_callbacks; }; -void addBlocker(std::vector > &blockers, sigc::connection *connection) +void addBlocker(std::vector > &blockers, sigc::connection *connection) { - blockers.push_back(boost::make_shared(connection)); + blockers.emplace_back(new SignalBlocker(connection)); } @@ -98,7 +96,7 @@ public: dlg._event_list_selection->set_mode(Gtk::SELECTION_SINGLE); { - std::vector > blockers; + std::vector > blockers; addBlocker(blockers, &(*dlg._callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); addBlocker(blockers, &(*dlg._callback_connections)[Inkscape::EventLog::CALLB_EXPAND]); @@ -119,7 +117,7 @@ public: void collapseRow(Gtk::TreeModel::Path const &path) { - std::vector > blockers; + std::vector > blockers; for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) { addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); @@ -134,7 +132,7 @@ public: void selectRow(Gtk::TreeModel::Path const &path) { - std::vector > blockers; + std::vector > blockers; for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) { addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); @@ -152,7 +150,7 @@ public: void clearEventList(Glib::RefPtr eventListStore) { if (eventListStore) { - std::vector > blockers; + std::vector > blockers; for (std::vector::iterator it(_connections.begin()); it != _connections.end(); ++it) { addBlocker(blockers, &(*it->_callback_connections)[Inkscape::EventLog::CALLB_SELECTION_CHANGE]); -- cgit v1.2.3