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.19 by sf-exg, Thu May 24 11:48:18 2012 UTC vs.
Revision 1.20 by root, Thu May 24 12:56:37 2012 UTC

320 return buf + at; 320 return buf + at;
321 } 321 }
322 322
323 iterator erase (iterator first, iterator last) 323 iterator erase (iterator first, iterator last)
324 { 324 {
325 size_t n = last - first; 325 size_type n = last - first;
326 size_type c = end () - last;
326 327
327 if (is_simple_enough ()) 328 if (is_simple_enough ())
328 memmove (first, last, sizeof (T) * n); 329 memmove (first, last, sizeof (T) * c);
329 else 330 else
330 copy<iterator> (first, last, n, cop_set); 331 copy<iterator> (first, last, c, cop_set);
331 332
332 sze -= n; 333 sze -= n;
333 destruct (buf + sze, n); 334 destruct (buf + sze, n);
334 335
335 return first; 336 return first;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines