MCPcopy Create free account
hub / github.com/crownengine/crown / memMoveRef

Function memMoveRef

3rdparty/bx/src/bx.cpp:150–172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

148 }
149
150 void memMoveRef(void* _dst, const void* _src, size_t _numBytes)
151 {
152 uint8_t* dst = (uint8_t*)_dst;
153 const uint8_t* src = (const uint8_t*)_src;
154
155 if (_numBytes == 0
156 || dst == src)
157 {
158 return;
159 }
160
161 // if (src+_numBytes <= dst || end <= src)
162 if (dst < src)
163 {
164 memCopy(_dst, _src, _numBytes);
165 return;
166 }
167
168 for (intptr_t ii = _numBytes-1; ii >= 0; --ii)
169 {
170 dst[ii] = src[ii];
171 }
172 }
173
174 void memMove(void* _dst, const void* _src, size_t _numBytes)
175 {

Callers 1

memMoveFunction · 0.85

Calls 1

memCopyFunction · 0.85

Tested by

no test coverage detected