| 490 | |
| 491 | template <typename T> |
| 492 | IMPLOT_INLINE T IndexData(const T* data, int idx, int count, int offset, int stride) { |
| 493 | const int s = ((offset == 0) << 0) | ((stride == sizeof(T)) << 1); |
| 494 | switch (s) { |
| 495 | case 3 : return data[idx]; |
| 496 | case 2 : return data[(offset + idx) % count]; |
| 497 | case 1 : return *(const T*)(const void*)((const unsigned char*)data + (size_t)((idx) ) * stride); |
| 498 | case 0 : return *(const T*)(const void*)((const unsigned char*)data + (size_t)((offset + idx) % count) * stride); |
| 499 | default: return T(0); |
| 500 | } |
| 501 | } |
| 502 | |
| 503 | template <typename T> |
| 504 | struct IndexerIdx { |
no outgoing calls
no test coverage detected