MCPcopy Create free account
hub / github.com/ShenCiao/CialloResearch / IndexData

Function IndexData

imgui/implot_items.cpp:491–500  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers 2

operator()Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected