Ne.app NeANT
The Ne.app NeANT User module of the NeANT distribution.
podarray.cc
Go to the documentation of this file.
1
30
31template <class _TypeT, _SizeT _Size>
32__rw_pod_array<_TypeT, _Size>&
33__rw_pod_array<_TypeT, _Size>::append (const _TypeT *__a, _SizeT __len)
34{
35 const _SizeT __newlen = _C_len + __len;
36
37 if (_C_len + __len >= _Size) {
38 _TypeT* const __tmp = new _TypeT [__newlen + 1];
39
40 memcpy (__tmp, _C_pbuf, _C_len * sizeof *__tmp);
41
42 if (_C_pbuf != _C_buffer)
43 delete[] _C_pbuf;
44
45 _C_pbuf = __tmp;
46 }
47
48 memcpy (_C_pbuf + _C_len, __a, __len * sizeof *_C_pbuf);
49
50 _C_len = __newlen;
51
52 _C_pbuf [_C_len] = _TypeT ();
53
54 return *this;
55}
56
57} // namespace __rw
#define _RWSTD_NAMESPACE(name)
Definition _defs.h:567