| 237 | } |
| 238 | |
| 239 | void ArrayBase::Blit(int inDestElement, ArrayBase *inSourceArray, int inSourceElement, int inElementCount) |
| 240 | { |
| 241 | int srcSize = inSourceArray->GetElementSize(); |
| 242 | int srcElems = inSourceArray->length; |
| 243 | if (inDestElement<0 || inSourceElement<0 || inSourceElement+inElementCount>srcElems) |
| 244 | hx::Throw( HX_CSTRING("blit out of bounds") ); |
| 245 | if (srcSize!=GetElementSize()) |
| 246 | hx::Throw( HX_CSTRING("blit array mismatch") ); |
| 247 | |
| 248 | int newSize = inDestElement + inElementCount; |
| 249 | if (newSize>length) |
| 250 | resize(newSize); |
| 251 | |
| 252 | const char *src = inSourceArray->mBase + inSourceElement*srcSize; |
| 253 | char *dest = mBase + inDestElement*srcSize; |
| 254 | int len = inElementCount*srcSize; |
| 255 | if (src+len < dest || dest+len<src) |
| 256 | memcpy(dest,src,len); |
| 257 | else |
| 258 | memmove(dest,src,len); |
| 259 | |
| 260 | HX_OBJ_WB_PESSIMISTIC_GET(this); |
| 261 | } |
| 262 | |
| 263 | int ArrayBase::__Compare(const hx::Object *inRHS) const |
| 264 | { |
nothing calls this directly
no test coverage detected