summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMenTaLguY <mental@rydia.net>2006-02-08 04:15:29 +0000
committermental <mental@users.sourceforge.net>2006-02-08 04:15:29 +0000
commitc7ffba4c8d0030bf5bf92dd4eef6fac6017c62bf (patch)
tree48842d0beebf72330fd5fd3e8b6d3edcfbedf257
parentrevert to black and white cursors (diff)
downloadinkscape-c7ffba4c8d0030bf5bf92dd4eef6fac6017c62bf.tar.gz
inkscape-c7ffba4c8d0030bf5bf92dd4eef6fac6017c62bf.zip
share_static -> share_static_string
(bzr r104)
-rw-r--r--ChangeLog8
-rw-r--r--src/debug/gc-heap.h2
-rw-r--r--src/debug/logger.cpp2
-rw-r--r--src/debug/sysv-heap.h2
-rw-r--r--src/jabber_whiteboard/deserializer.cpp8
-rw-r--r--src/sp-object.cpp4
-rw-r--r--src/util/share.h5
-rw-r--r--src/xml/simple-node.cpp16
8 files changed, 27 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 95281eb66..3b8ff6a85 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-02-07 MenTaLguY <mental@rydia.net>
+
+ * 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 <mjwybrow@users.sourceforge.net>
* 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<char> 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 << "<?xml version=\"1.0\"?>\n";
log_stream.flush();
_enabled = true;
- start<SimpleEvent<Event::CORE> >(Util::share_static("session"));
+ start<SimpleEvent<Event::CORE> >(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<char> 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<char> 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<T> share_unsafe(T const *obj) {
return shared_ptr<T>::share_unsafe(obj);
}
-template <typename T>
-inline shared_ptr<T> share_static(T const *obj) {
- return shared_ptr<T>::share_unsafe(obj);
+inline shared_ptr<char> share_static_string(char const *string) {
+ return share_unsafe(string);
}
template <typename T1, typename T2>
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<char> 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<char> 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<char> 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<char> 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<char> 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;