| 470 | } |
| 471 | |
| 472 | static bool CopyStreamInternal(BufferStream* dststream, uint32_t dstoffset, |
| 473 | const BufferStream* srcstream, uint32_t srcoffset, |
| 474 | uint32_t count) |
| 475 | { |
| 476 | #define DM_COPY_STREAM(_T_) CopyStreamInternalT<_T_>((_T_*)dststream->m_Data, dstoffset, dststream->m_Stride, \ |
| 477 | (_T_*)srcstream->m_Data, srcoffset, srcstream->m_Stride, \ |
| 478 | count, dststream->m_TypeCount) |
| 479 | switch(dststream->m_Type) |
| 480 | { |
| 481 | case dmBuffer::VALUE_TYPE_UINT8: DM_COPY_STREAM(uint8_t); break; |
| 482 | case dmBuffer::VALUE_TYPE_UINT16: DM_COPY_STREAM(uint16_t); break; |
| 483 | case dmBuffer::VALUE_TYPE_UINT32: DM_COPY_STREAM(uint32_t); break; |
| 484 | case dmBuffer::VALUE_TYPE_UINT64: DM_COPY_STREAM(uint64_t); break; |
| 485 | case dmBuffer::VALUE_TYPE_INT8: DM_COPY_STREAM(int8_t); break; |
| 486 | case dmBuffer::VALUE_TYPE_INT16: DM_COPY_STREAM(int16_t); break; |
| 487 | case dmBuffer::VALUE_TYPE_INT32: DM_COPY_STREAM(int32_t); break; |
| 488 | case dmBuffer::VALUE_TYPE_INT64: DM_COPY_STREAM(int64_t); break; |
| 489 | case dmBuffer::VALUE_TYPE_FLOAT32: DM_COPY_STREAM(float); break; |
| 490 | default: |
| 491 | return false; |
| 492 | } |
| 493 | return true; |
| 494 | #undef DM_COPY_STREAM |
| 495 | } |
| 496 | |
| 497 | /*# copies data from one stream to another |
| 498 | * |
no outgoing calls
no test coverage detected