ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/libptytty/src/estl.h
(Generate patch)

Comparing libptytty/src/estl.h (file contents):
Revision 1.16 by root, Sat May 19 02:23:17 2012 UTC vs.
Revision 1.17 by sf-exg, Sat May 19 13:12:07 2012 UTC

82 82
83 static void construct (iterator a, size_type n = 1) 83 static void construct (iterator a, size_type n = 1)
84 { 84 {
85 if (!is_simple_enough ()) 85 if (!is_simple_enough ())
86 while (n--) 86 while (n--)
87 new (*a++) T (); 87 new (a++) T ();
88 } 88 }
89 89
90 static void destruct (iterator a, size_type n = 1) 90 static void destruct (iterator a, size_type n = 1)
91 { 91 {
92 if (!is_simple_enough ()) 92 if (!is_simple_enough ())
152 iterator src = buf + pos; 152 iterator src = buf + pos;
153 if (is_simple_enough ()) 153 if (is_simple_enough ())
154 memmove (src + n, src, sizeof (T) * n); 154 memmove (src + n, src, sizeof (T) * n);
155 else 155 else
156 for (size_type i = n; i--; ) 156 for (size_type i = n; i--; )
157 op (src + n + i, src + i); 157 cop_set (src + n + i, src + i);
158 } 158 }
159 159
160public: 160public:
161 size_type capacity () const { return res; } 161 size_type capacity () const { return res; }
162 size_type size () const { return sze; } 162 size_type size () const { return sze; }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines