From 4f46bb0e09ddfa540b60bd4d152385729127aceb Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Mon, 6 Feb 2006 04:15:05 +0000 Subject: replace Util::SharedCStringPtr with the more general Util::shared_ptr<> (bzr r87) --- src/sp-object.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/sp-object.cpp') diff --git a/src/sp-object.cpp b/src/sp-object.cpp index d23a4d640..d8fe26b87 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -225,16 +225,16 @@ sp_object_finalize(GObject *object) namespace { -Inkscape::Util::SharedCStringPtr stringify(SPObject *obj) { +Inkscape::Util::shared_ptr stringify(SPObject *obj) { char *temp=g_strdup_printf("%p", obj); - Inkscape::Util::SharedCStringPtr result=Inkscape::Util::SharedCStringPtr::copy(temp); + Inkscape::Util::shared_ptr result=Inkscape::Util::share_string(temp); g_free(temp); return result; } -Inkscape::Util::SharedCStringPtr stringify(unsigned n) { +Inkscape::Util::shared_ptr stringify(unsigned n) { char *temp=g_strdup_printf("%u", n); - Inkscape::Util::SharedCStringPtr result=Inkscape::Util::SharedCStringPtr::copy(temp); + Inkscape::Util::shared_ptr result=Inkscape::Util::share_string(temp); g_free(temp); return result; } @@ -250,11 +250,11 @@ public: static Category category() { return REFCOUNT; } - Inkscape::Util::SharedCStringPtr name() const { + Inkscape::Util::shared_ptr name() const { if ( _type == REF) { - return Inkscape::Util::SharedCStringPtr::coerce("sp-object-ref"); + return Inkscape::Util::share_static("sp-object-ref"); } else { - return Inkscape::Util::SharedCStringPtr::coerce("sp-object-unref"); + return Inkscape::Util::share_static("sp-object-unref"); } } unsigned propertyCount() const { return 2; } @@ -270,7 +270,7 @@ public: } private: - Inkscape::Util::SharedCStringPtr _object; + Inkscape::Util::shared_ptr _object; unsigned _refcount; Type _type; }; -- cgit v1.2.3