From e7aaaeab33d77c37efc16d7e97d422407fd497a0 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Mon, 5 Mar 2012 15:42:23 -0600 Subject: Added boost::noncopyable to format_t and format_t::element_t --- src/format.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/format.h') diff --git a/src/format.h b/src/format.h index 1b8513bb..60ae2abe 100644 --- a/src/format.h +++ b/src/format.h @@ -55,7 +55,7 @@ class format_t : public expr_base_t, public noncopyable { typedef expr_base_t base_type; - struct element_t : public supports_flags<> + struct element_t : public supports_flags<>, public noncopyable { #define ELEMENT_ALIGN_LEFT 0x01 @@ -65,7 +65,7 @@ class format_t : public expr_base_t, public noncopyable std::size_t min_width; std::size_t max_width; variant data; - shared_ptr next; + scoped_ptr next; element_t() throw() : supports_flags<>(), type(STRING), min_width(0), max_width(0) { @@ -82,7 +82,6 @@ class format_t : public expr_base_t, public noncopyable min_width = elem.min_width; max_width = elem.max_width; data = elem.data; - next = elem.next; } return *this; } @@ -104,7 +103,7 @@ class format_t : public expr_base_t, public noncopyable void dump(std::ostream& out) const; }; - shared_ptr elements; + scoped_ptr elements; public: static enum elision_style_t { -- cgit v1.2.3