SNEX unsafe access, again?
-
@Christoph-Hart Getting an
unsafe access
warning when branching, while it is working just above that branch.
So if I comment out theif
statement, or replace withif(true)
, no more warning...
Is that me not understanding and making a mistake withisClassB
bool?span<span<ClassA, MAX_NUM_CHANNELS>, 2> classB; index::clamped<MAX_NUM_CHANNELS, false> idx; bool isClassB = false; template <typename ProcessDataType> void process(ProcessDataType& data) { const int nbChannels = Math.min(data.getNumChannels(), MAX_NUM_CHANNELS); for (int i = 0; i<nbChannels; i++) { idx = i; for (auto& s: data[i]) { s = classB[PUSH][idx].processSample(s) ; if (isClassB) s = classB[PULL][idx].processSample(s) ; // unsafe access because of idx } } }
-
@Christoph-Hart Bump