From 7663e55d418b5ea8765421c9570dba40f6bd97fd Mon Sep 17 00:00:00 2001 From: MenTaLguY Date: Wed, 15 Mar 2006 03:22:23 +0000 Subject: shared_ptr -> ptr_shared (bzr r240) --- src/debug/event.h | 12 ++++++------ src/debug/gc-heap.h | 2 +- src/debug/heap.h | 2 +- src/debug/logger.cpp | 8 ++++---- src/debug/simple-event.h | 6 +++--- src/debug/sysv-heap.h | 2 +- 6 files changed, 16 insertions(+), 16 deletions(-) (limited to 'src/debug') diff --git a/src/debug/event.h b/src/debug/event.h index 8232f890d..fdc50f225 100644 --- a/src/debug/event.h +++ b/src/debug/event.h @@ -37,23 +37,23 @@ public: struct PropertyPair { public: PropertyPair() {} - PropertyPair(Util::shared_ptr n, Util::shared_ptr v) + PropertyPair(Util::ptr_shared n, Util::ptr_shared v) : name(n), value(v) {} - PropertyPair(char const *n, Util::shared_ptr v) + PropertyPair(char const *n, Util::ptr_shared v) : name(Util::share_string(n)), value(v) {} - PropertyPair(Util::shared_ptr 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::shared_ptr name; - Util::shared_ptr value; + Util::ptr_shared name; + Util::ptr_shared value; }; static Category category() { return OTHER; } - virtual Util::shared_ptr name() const=0; + virtual Util::ptr_shared name() const=0; virtual unsigned propertyCount() const=0; virtual PropertyPair property(unsigned property) const=0; }; diff --git a/src/debug/gc-heap.h b/src/debug/gc-heap.h index 75a60158e..4d0343f12 100644 --- a/src/debug/gc-heap.h +++ b/src/debug/gc-heap.h @@ -23,7 +23,7 @@ public: int features() const { return SIZE_AVAILABLE | USED_AVAILABLE | GARBAGE_COLLECTED; } - Util::shared_ptr name() const { + Util::ptr_shared name() const { return Util::share_static_string("libgc"); } Heap::Stats stats() const { diff --git a/src/debug/heap.h b/src/debug/heap.h index ef563030f..f3cc250a5 100644 --- a/src/debug/heap.h +++ b/src/debug/heap.h @@ -36,7 +36,7 @@ public: virtual int features() const=0; - virtual Util::shared_ptr name() const=0; + virtual Util::ptr_shared name() const=0; virtual Stats stats() const=0; virtual void force_collect()=0; }; diff --git a/src/debug/logger.cpp b/src/debug/logger.cpp index 3acd95ff5..a3f6899ef 100644 --- a/src/debug/logger.cpp +++ b/src/debug/logger.cpp @@ -25,7 +25,7 @@ bool Logger::_category_mask[Event::N_CATEGORIES]; namespace { -static void write_escaped_value(std::ostream &os, Util::shared_ptr value) { +static void write_escaped_value(std::ostream &os, Util::ptr_shared value) { for ( char const *current=value ; *current ; ++current ) { switch (*current) { case '&': @@ -57,7 +57,7 @@ static void write_indent(std::ostream &os, unsigned depth) { static std::ofstream log_stream; static bool empty_tag=false; -typedef std::vector, GC::Alloc, GC::MANUAL> > TagStack; +typedef std::vector, GC::Alloc, GC::MANUAL> > TagStack; static TagStack &tag_stack() { static TagStack stack; return stack; @@ -136,7 +136,7 @@ void Logger::init() { } void Logger::_start(Event const &event) { - Util::shared_ptr name=event.name(); + Util::ptr_shared name=event.name(); if (empty_tag) { log_stream << ">\n"; @@ -161,7 +161,7 @@ void Logger::_start(Event const &event) { } void Logger::_skip() { - tag_stack().push_back(Util::shared_ptr()); + tag_stack().push_back(Util::ptr_shared()); } void Logger::_finish() { diff --git a/src/debug/simple-event.h b/src/debug/simple-event.h index 90eed3a0e..3695eaa6a 100644 --- a/src/debug/simple-event.h +++ b/src/debug/simple-event.h @@ -21,17 +21,17 @@ namespace Debug { template class SimpleEvent : public Event { public: - SimpleEvent(Util::shared_ptr name) : _name(name) {} + SimpleEvent(Util::ptr_shared name) : _name(name) {} SimpleEvent(char const *name) : _name(Util::share_string(name)) {} static Category category() { return C; } - Util::shared_ptr name() const { return _name; } + Util::ptr_shared name() const { return _name; } unsigned propertyCount() const { return 0; } PropertyPair property(unsigned property) const { return PropertyPair(); } private: - Util::shared_ptr _name; + Util::ptr_shared _name; }; } diff --git a/src/debug/sysv-heap.h b/src/debug/sysv-heap.h index 840afac32..82fe9b769 100644 --- a/src/debug/sysv-heap.h +++ b/src/debug/sysv-heap.h @@ -23,7 +23,7 @@ public: int features() const; - Util::shared_ptr name() const { + Util::ptr_shared name() const { return Util::share_static_string("standard malloc()"); } Stats stats() const; -- cgit v1.2.3