summaryrefslogtreecommitdiffstats
path: root/src/io
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/io
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 'src/io')
-rw-r--r--src/io/resource.cpp4
-rw-r--r--src/io/resource.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/io/resource.cpp b/src/io/resource.cpp
index bc6c9f7b0..c3cd9e403 100644
--- a/src/io/resource.cpp
+++ b/src/io/resource.cpp
@@ -113,10 +113,10 @@ gchar *_get_path(Domain domain, Type type, char const *filename)
return path;
}
-Util::ptr_shared<char> get_path(Domain domain, Type type, char const *filename)
+Util::ptr_shared get_path(Domain domain, Type type, char const *filename)
{
char *path = _get_path(domain, type, filename);
- Util::ptr_shared<char> result=Util::share_string(path);
+ Util::ptr_shared result=Util::share_string(path);
g_free(path);
return result;
}
diff --git a/src/io/resource.h b/src/io/resource.h
index d12372024..d7dd506ad 100644
--- a/src/io/resource.h
+++ b/src/io/resource.h
@@ -56,7 +56,7 @@ enum Domain {
USER
};
-Util::ptr_shared<char> get_path(Domain domain, Type type,
+Util::ptr_shared get_path(Domain domain, Type type,
char const *filename=NULL);
Glib::ustring get_path_ustring(Domain domain, Type type,