diff options
| author | Jan Lingscheid <jan.linscheid@auticon.de> | 2017-10-18 14:03:34 +0000 |
|---|---|---|
| committer | Jan Lingscheid <jan.linscheid@auticon.de> | 2017-10-18 14:03:34 +0000 |
| commit | 41b862f1c4eaea48bdd0d546e2bb31907f15857b (patch) | |
| tree | e667c91439f0f04aa1f2cec1d3eafddf80bc4ecc /src/debug/event.h | |
| parent | Replace boost::shared_ptr (diff) | |
| download | inkscape-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/debug/event.h')
| -rw-r--r-- | src/debug/event.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/debug/event.h b/src/debug/event.h index 1cdd4f7e2..2d3751ff5 100644 --- a/src/debug/event.h +++ b/src/debug/event.h @@ -40,23 +40,23 @@ public: struct PropertyPair { public: PropertyPair() {} - PropertyPair(Util::ptr_shared<char> n, Util::ptr_shared<char> v) + PropertyPair(Util::ptr_shared n, Util::ptr_shared v) : name(n), value(v) {} - PropertyPair(char const *n, Util::ptr_shared<char> v) + PropertyPair(char const *n, Util::ptr_shared v) : name(Util::share_string(n)), value(v) {} - PropertyPair(Util::ptr_shared<char> n, char const *v) + PropertyPair(Util::ptr_shared n, char const *v) : name(n), value(Util::share_string(v)) {} PropertyPair(char const *n, char const *v) : name(Util::share_string(n)), value(Util::share_string(v)) {} - Util::ptr_shared<char> name; - Util::ptr_shared<char> value; + Util::ptr_shared name; + Util::ptr_shared value; }; static Category category() { return OTHER; } - virtual Util::ptr_shared<char> name() const=0; + virtual Util::ptr_shared name() const=0; virtual unsigned propertyCount() const=0; virtual PropertyPair property(unsigned property) const=0; |
