From: mental Date: Wed, 8 Feb 2006 04:15:29 +0000 (+0000) Subject: share_static -> share_static_string X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=420d49b61e68ada5f9029ca1e84d987e8846228f;p=inkscape.git share_static -> share_static_string --- diff --git a/ChangeLog b/ChangeLog index 95281eb66..3b8ff6a85 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2006-02-07 MenTaLguY + + * src/debug/gc-heap.h, src/debug/logger.cpp, src/debug/sysv-heap.h, + src/jabber_whiteboard/deserializer.cpp, src/sp-object.cpp, + src/util/share.h, src/xml/simple-node.cpp: + + share_static -> share_static_string + 2006-02-07 Michael Wybrow * src/jabber_whiteboard/message-utilities.h, diff --git a/src/debug/gc-heap.h b/src/debug/gc-heap.h index 0a9534701..75a60158e 100644 --- a/src/debug/gc-heap.h +++ b/src/debug/gc-heap.h @@ -24,7 +24,7 @@ public: return SIZE_AVAILABLE | USED_AVAILABLE | GARBAGE_COLLECTED; } Util::shared_ptr name() const { - return Util::share_static("libgc"); + return Util::share_static_string("libgc"); } Heap::Stats stats() const { Stats stats; diff --git a/src/debug/logger.cpp b/src/debug/logger.cpp index 6fb1aee05..3acd95ff5 100644 --- a/src/debug/logger.cpp +++ b/src/debug/logger.cpp @@ -128,7 +128,7 @@ void Logger::init() { log_stream << "\n"; log_stream.flush(); _enabled = true; - start >(Util::share_static("session")); + start >(Util::share_static_string("session")); std::atexit(&do_shutdown); } } diff --git a/src/debug/sysv-heap.h b/src/debug/sysv-heap.h index 9a07a3261..840afac32 100644 --- a/src/debug/sysv-heap.h +++ b/src/debug/sysv-heap.h @@ -24,7 +24,7 @@ public: int features() const; Util::shared_ptr name() const { - return Util::share_static("standard malloc()"); + return Util::share_static_string("standard malloc()"); } Stats stats() const; void force_collect() {} diff --git a/src/jabber_whiteboard/deserializer.cpp b/src/jabber_whiteboard/deserializer.cpp index 066557ad5..2df35e8ab 100644 --- a/src/jabber_whiteboard/deserializer.cpp +++ b/src/jabber_whiteboard/deserializer.cpp @@ -299,14 +299,14 @@ Deserializer::deserializeEventChgContent(Glib::ustring const& msg) if (MessageUtilities::findTag(buf, msg)) { oldval = Util::share_string(buf.data.c_str()); } else { - oldval = Util::share_static(""); + oldval = Util::share_static_string(""); } buf.tag = MESSAGE_NEWVAL; if (MessageUtilities::findTag(buf, msg)) { newval = Util::share_string(buf.data.c_str()); } else { - newval = Util::share_static(""); + newval = Util::share_static_string(""); } // 3. Find the node identified by the ID. If we cannot find it, return. @@ -348,7 +348,7 @@ Deserializer::deserializeEventChgAttr(Glib::ustring const& msg) if (MessageUtilities::findTag(buf, msg)) { newval = Util::share_string(buf.data.c_str()); } else { - newval = Util::share_static(""); + newval = Util::share_static_string(""); } // 3. Extract optional attributes: old value. If we do not find it in the message, @@ -358,7 +358,7 @@ Deserializer::deserializeEventChgAttr(Glib::ustring const& msg) if (MessageUtilities::findTag(buf, msg)) { oldval = Util::share_string(buf.data.c_str()); } else { - oldval = Util::share_static(""); + oldval = Util::share_static_string(""); } // 4. Look up this node in the local node database and external tracker. diff --git a/src/sp-object.cpp b/src/sp-object.cpp index d8fe26b87..f97007b51 100644 --- a/src/sp-object.cpp +++ b/src/sp-object.cpp @@ -252,9 +252,9 @@ public: Inkscape::Util::shared_ptr name() const { if ( _type == REF) { - return Inkscape::Util::share_static("sp-object-ref"); + return Inkscape::Util::share_static_string("sp-object-ref"); } else { - return Inkscape::Util::share_static("sp-object-unref"); + return Inkscape::Util::share_static_string("sp-object-unref"); } } unsigned propertyCount() const { return 2; } diff --git a/src/util/share.h b/src/util/share.h index e9e6c5eb0..93cef7a02 100644 --- a/src/util/share.h +++ b/src/util/share.h @@ -113,9 +113,8 @@ inline shared_ptr share_unsafe(T const *obj) { return shared_ptr::share_unsafe(obj); } -template -inline shared_ptr share_static(T const *obj) { - return shared_ptr::share_unsafe(obj); +inline shared_ptr share_static_string(char const *string) { + return share_unsafe(string); } template diff --git a/src/xml/simple-node.cpp b/src/xml/simple-node.cpp index 5e21f941e..fa626a3f2 100644 --- a/src/xml/simple-node.cpp +++ b/src/xml/simple-node.cpp @@ -76,7 +76,7 @@ public: static Category category() { return XML; } Util::shared_ptr name() const { - return Util::share_static("add-child"); + return Util::share_static_string("add-child"); } unsigned propertyCount() const { return 3; } PropertyPair property(unsigned i) const { @@ -107,7 +107,7 @@ public: static Category category() { return XML; } Util::shared_ptr name() const { - return Util::share_static("remove-child"); + return Util::share_static_string("remove-child"); } unsigned propertyCount() const { return 2; } PropertyPair property(unsigned i) const { @@ -141,7 +141,7 @@ public: static Category category() { return XML; } Util::shared_ptr name() const { - return Util::share_static("set-child-position"); + return Util::share_static_string("set-child-position"); } unsigned propertyCount() const { return 3; } PropertyPair property(unsigned i) const { @@ -173,9 +173,9 @@ public: Util::shared_ptr name() const { if (_content) { - return Util::share_static("set-content"); + return Util::share_static_string("set-content"); } else { - return Util::share_static("clear-content"); + return Util::share_static_string("clear-content"); } } unsigned propertyCount() const { @@ -213,9 +213,9 @@ public: Util::shared_ptr name() const { if (_value) { - return Util::share_static("set-attribute"); + return Util::share_static_string("set-attribute"); } else { - return Util::share_static("clear-attribute"); + return Util::share_static_string("clear-attribute"); } } unsigned propertyCount() const { @@ -247,7 +247,7 @@ private: using Inkscape::Util::shared_ptr; using Inkscape::Util::share_string; using Inkscape::Util::share_unsafe; -using Inkscape::Util::share_static; +using Inkscape::Util::share_static_string; using Inkscape::Util::List; using Inkscape::Util::MutableList; using Inkscape::Util::cons;