| 368 | |
| 369 | template <typename Source, typename Dest> |
| 370 | static inline void CastIntsInternal(const Source* src, Dest* dest, int64_t length) { |
| 371 | while (length >= 4) { |
| 372 | dest[0] = static_cast<Dest>(src[0]); |
| 373 | dest[1] = static_cast<Dest>(src[1]); |
| 374 | dest[2] = static_cast<Dest>(src[2]); |
| 375 | dest[3] = static_cast<Dest>(src[3]); |
| 376 | length -= 4; |
| 377 | src += 4; |
| 378 | dest += 4; |
| 379 | } |
| 380 | while (length > 0) { |
| 381 | *dest++ = static_cast<Dest>(*src++); |
| 382 | --length; |
| 383 | } |
| 384 | } |
| 385 | |
| 386 | void DowncastInts(const int64_t* source, int8_t* dest, int64_t length) { |
| 387 | CastIntsInternal(source, dest, length); |
no outgoing calls
no test coverage detected