summaryrefslogtreecommitdiffstats
path: root/src/layer-manager.cpp
diff options
context:
space:
mode:
authorJan Lingscheid <jan.linscheid@auticon.de>2017-10-18 14:03:34 +0000
committerJan Lingscheid <jan.linscheid@auticon.de>2017-10-18 14:03:34 +0000
commit41b862f1c4eaea48bdd0d546e2bb31907f15857b (patch)
treee667c91439f0f04aa1f2cec1d3eafddf80bc4ecc /src/layer-manager.cpp
parentReplace boost::shared_ptr (diff)
downloadinkscape-41b862f1c4eaea48bdd0d546e2bb31907f15857b.tar.gz
inkscape-41b862f1c4eaea48bdd0d546e2bb31907f15857b.zip
Refactor Util::ptr_shared
Util::ptr_shared<T> was only used in its <char> specialization, so it is now refactored into a non-template class. Using it with arbitary classes was dangerous anyway.
Diffstat (limited to '')
-rw-r--r--src/layer-manager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/layer-manager.cpp b/src/layer-manager.cpp
index 3a6cce99c..f68175055 100644
--- a/src/layer-manager.cpp
+++ b/src/layer-manager.cpp
@@ -40,8 +40,8 @@ public:
virtual void notifyChildAdded( Node &/*node*/, Node &/*child*/, Node */*prev*/ ) {}
virtual void notifyChildRemoved( Node &/*node*/, Node &/*child*/, Node */*prev*/ ) {}
virtual void notifyChildOrderChanged( Node &/*node*/, Node &/*child*/, Node */*old_prev*/, Node */*new_prev*/ ) {}
- virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared<char> /*old_content*/, Util::ptr_shared<char> /*new_content*/ ) {}
- virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared<char> /*old_value*/, Util::ptr_shared<char> /*new_value*/ ) {
+ virtual void notifyContentChanged( Node &/*node*/, Util::ptr_shared /*old_content*/, Util::ptr_shared /*new_content*/ ) {}
+ virtual void notifyAttributeChanged( Node &/*node*/, GQuark name, Util::ptr_shared /*old_value*/, Util::ptr_shared /*new_value*/ ) {
if ( name == _lockedAttr || name == _labelAttr ) {
if ( _mgr && _obj ) {
_mgr->_objectModified( _obj, 0 );
@@ -59,9 +59,9 @@ public:
/*
namespace {
-Util::ptr_shared<char> stringify_node(Node const &node);
+Util::ptr_shared stringify_node(Node const &node);
-Util::ptr_shared<char> stringify_obj(SPObject const &obj) {
+Util::ptr_shared stringify_obj(SPObject const &obj) {
gchar *string;
if (obj.id) {
@@ -70,7 +70,7 @@ Util::ptr_shared<char> stringify_obj(SPObject const &obj) {
string = g_strdup_printf("SPObject(%p) repr(%p)", &obj, obj.repr);
}
- Util::ptr_shared<char> result=Util::share_string(string);
+ Util::ptr_shared result=Util::share_string(string);
g_free(string);
return result;
@@ -80,7 +80,7 @@ typedef Debug::SimpleEvent<Debug::Event::OTHER> DebugLayer;
class DebugLayerNote : public DebugLayer {
public:
- DebugLayerNote(Util::ptr_shared<char> descr)
+ DebugLayerNote(Util::ptr_shared descr)
: DebugLayer(Util::share_static_string("layer-note"))
{
_addProperty("descr", descr);
@@ -97,7 +97,7 @@ public:
class DebugLayerObj : public DebugLayer {
public:
- DebugLayerObj(SPObject const& obj, Util::ptr_shared<char> name)
+ DebugLayerObj(SPObject const& obj, Util::ptr_shared name)
: DebugLayer(name)
{
_addProperty("layer", stringify_obj(obj));