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.18 by root, Thu May 24 11:03:47 2012 UTC vs.
Revision 1.19 by sf-exg, Thu May 24 11:48:18 2012 UTC

318 *i++ = t; 318 *i++ = t;
319 319
320 return buf + at; 320 return buf + at;
321 } 321 }
322 322
323 void erase (iterator first, iterator last) 323 iterator erase (iterator first, iterator last)
324 { 324 {
325 size_t n = last - first; 325 size_t n = last - first;
326 326
327 if (is_simple_enough ()) 327 if (is_simple_enough ())
328 memmove (first, last, sizeof (T) * n); 328 memmove (first, last, sizeof (T) * n);
329 else 329 else
330 copy<iterator> (first, last, n, cop_set); 330 copy<iterator> (first, last, n, cop_set);
331 331
332 sze -= n; 332 sze -= n;
333 destruct (buf + sze, n); 333 destruct (buf + sze, n);
334 }
335 334
335 return first;
336 }
337
336 void erase (iterator pos) 338 iterator erase (iterator pos)
337 { 339 {
338 if (pos != end ()) 340 if (pos != end ())
339 erase (pos, pos + 1); 341 erase (pos, pos + 1);
342
343 return pos;
340 } 344 }
341}; 345};
342 346
343template<class T> 347template<class T>
344bool operator ==(const simplevec<T> &v1, const simplevec<T> &v2) 348bool operator ==(const simplevec<T> &v1, const simplevec<T> &v2)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines