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/logger.cpp | |
| 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 '')
| -rw-r--r-- | src/debug/logger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/debug/logger.cpp b/src/debug/logger.cpp index 2eb81a0ba..d422b8e72 100644 --- a/src/debug/logger.cpp +++ b/src/debug/logger.cpp @@ -26,7 +26,7 @@ bool Logger::_category_mask[Event::N_CATEGORIES]; namespace { -static void write_escaped_value(std::ostream &os, Util::ptr_shared<char> value) { +static void write_escaped_value(std::ostream &os, Util::ptr_shared value) { for ( char const *current=value ; *current ; ++current ) { switch (*current) { case '&': @@ -58,7 +58,7 @@ static void write_indent(std::ostream &os, unsigned depth) { static std::ofstream log_stream; static bool empty_tag=false; -typedef std::vector<Util::ptr_shared<char>, GC::Alloc<Util::ptr_shared<char>, GC::MANUAL> > TagStack; +typedef std::vector<Util::ptr_shared, GC::Alloc<Util::ptr_shared, GC::MANUAL> > TagStack; static TagStack &tag_stack() { static TagStack stack; return stack; @@ -158,7 +158,7 @@ void Logger::init() { } void Logger::_start(Event const &event) { - Util::ptr_shared<char> name=event.name(); + Util::ptr_shared name=event.name(); if (empty_tag) { log_stream << ">\n"; @@ -185,7 +185,7 @@ void Logger::_start(Event const &event) { } void Logger::_skip() { - tag_stack().push_back(Util::ptr_shared<char>()); + tag_stack().push_back(Util::ptr_shared()); } void Logger::_finish() { |
