summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 504a790)
raw | patch | inline | side by side (parent: 504a790)
author | mental <mental@users.sourceforge.net> | |
Wed, 8 Feb 2006 04:15:29 +0000 (04:15 +0000) | ||
committer | mental <mental@users.sourceforge.net> | |
Wed, 8 Feb 2006 04:15:29 +0000 (04:15 +0000) |
diff --git a/ChangeLog b/ChangeLog
index 95281eb66d795586e3ffc5987a558611c63b2bc2..3b8ff6a85e337457c92538d2c77100c7c40a6d5d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
+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 0a9534701deb01272f99b72eb7098feb5b5d2169..75a60158ee3f066232152280c68ede961c06fd0f 100644 (file)
--- a/src/debug/gc-heap.h
+++ b/src/debug/gc-heap.h
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 6fb1aee05e685bb661b590e29acf26c25be4eff5..3acd95ff523e6a78588d3bb1a9293b3a619e38d0 100644 (file)
--- a/src/debug/logger.cpp
+++ b/src/debug/logger.cpp
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 9a07a3261ea452d22bf83cc7c2cd8ad1c112a134..840afac3261b687b7f2c40a2103f895027f6d5e9 100644 (file)
--- a/src/debug/sysv-heap.h
+++ b/src/debug/sysv-heap.h
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() {}
index 066557ad55b22f05fe73a95867da97650a6dfdcf..2df35e8abf2115a3eb127c9af449b445b4e9897d 100644 (file)
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.
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,
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 d8fe26b8746759c19580fac244cdbe94f38bae39..f97007b5140afeea94db994886676cdeb766777b 100644 (file)
--- a/src/sp-object.cpp
+++ b/src/sp-object.cpp
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 e9e6c5eb0cdd5e54f56e951c76cd2b8de9997732..93cef7a028598a910330694651b0a3be95a35cf7 100644 (file)
--- a/src/util/share.h
+++ b/src/util/share.h
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>
index 5e21f941ee9ec40270ae561587b23dabc5a41bf6..fa626a3f2d19e5e640e46da86fec7f85d9854268 100644 (file)
--- a/src/xml/simple-node.cpp
+++ b/src/xml/simple-node.cpp
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 {
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 {
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 {
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 {
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 {
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;