MCPcopy Create free account
hub / github.com/SatDump/SatDump / IndexData

Function IndexData

src-core/imgui/implot/implot_items.cpp:492–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

490
491template <typename T>
492IMPLOT_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
503template <typename T>
504struct IndexerIdx {

Callers 2

operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected