summaryrefslogtreecommitdiffstats
path: root/src/selection-describer.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-11-22 04:17:27 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-12-03 09:35:13 +0000
commit6af653ae04272a27390821842d3e8e23c6af3efe (patch)
tree33956cb2251979c6d3b06882d858a6c36f8c5dfc /src/selection-describer.cpp
parentAdd other sofwar binds to new keys, add missing one (diff)
downloadinkscape-6af653ae04272a27390821842d3e8e23c6af3efe.tar.gz
inkscape-6af653ae04272a27390821842d3e8e23c6af3efe.zip
Replace InkGC with std::shared_ptr for MessageStack
There are many places which still use this stack unmanaged (using desktop->getMessageStack()) but those are all leaf calls which make use of the stack and never store it anywhere, so this is fine.
Diffstat (limited to 'src/selection-describer.cpp')
-rw-r--r--src/selection-describer.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/selection-describer.cpp b/src/selection-describer.cpp
index 9767a55bb..841e8e095 100644
--- a/src/selection-describer.cpp
+++ b/src/selection-describer.cpp
@@ -13,7 +13,9 @@
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
*/
+#include <memory>
#include <set>
+#include <utility>
#include <glibmm/i18n.h>
@@ -86,8 +88,8 @@ static int count_filtered (const std::vector<SPItem*> &items)
namespace Inkscape {
-SelectionDescriber::SelectionDescriber(Inkscape::Selection *selection, MessageStack *stack, char *when_selected, char *when_nothing)
- : _context(stack),
+SelectionDescriber::SelectionDescriber(Inkscape::Selection *selection, std::shared_ptr<MessageStack> stack, char *when_selected, char *when_nothing)
+ : _context(std::move(stack)),
_when_selected (when_selected),
_when_nothing (when_nothing)
{