ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/simplevec.h
(Generate patch)

Comparing rxvt-unicode/src/simplevec.h (file contents):
Revision 1.2 by pcg, Tue Nov 25 11:52:42 2003 UTC vs.
Revision 1.3 by pcg, Sat Jan 31 00:20:21 2004 UTC

76 void reserve (iterator where, size_type n) 76 void reserve (iterator where, size_type n)
77 { 77 {
78 if (_last + n <= _size) { 78 if (_last + n <= _size) {
79 memmove (where+n, where, (end()-where)*sizeof(T)); 79 memmove (where+n, where, (end()-where)*sizeof(T));
80 } else { 80 } else {
81 long sz = _last+n; 81 size_type sz = _last+n;
82 sz = (_size == 0) ? max(sz, 5) : max(sz, 2*_size); 82 sz = (_size == 0) ? max(sz, 5) : max(sz, 2*_size);
83 T *nbuf = alloc (sz); 83 T *nbuf = alloc (sz);
84 if (_buf) { 84 if (_buf) {
85 memcpy (nbuf, begin(), (where-begin())*sizeof(T)); 85 memcpy (nbuf, begin(), (where-begin())*sizeof(T));
86 memcpy (nbuf + (where-begin()) + n, where, 86 memcpy (nbuf + (where-begin()) + n, where,

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines