acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
copy_elements.h
1
// From _impl.h by camilo on 2022-10-23 00:25 <3ThomasBorregaardSorensen!!
2
#pragma once
3
4
5
template
<
class
TYPE>
6
inline
void
CopyElements(TYPE * pDest,
const
TYPE * pSrc, ::collection::count nCount)
7
{
8
9
ENSURE((nCount == 0) || ((pDest != 0) && (pSrc != 0)));
10
ASSERT((nCount == 0) || is_memory_segment_ok(pDest, (
size_t
)nCount *
sizeof
(TYPE)));
11
ASSERT((nCount == 0) || is_memory_segment_ok(pSrc, (
size_t
)nCount *
sizeof
(TYPE)));
12
13
// default is matter-copy using assignment
14
while
(nCount--)
15
{
16
17
*pDest++ = *pSrc++;
18
19
}
20
21
}
22
23
24
25
prototype
collection
copy_elements.h
Generated by
1.17.0