diff --git a/sdrbase/dsp/projector.cpp b/sdrbase/dsp/projector.cpp index 016d06f04..30c4124d3 100644 --- a/sdrbase/dsp/projector.cpp +++ b/sdrbase/dsp/projector.cpp @@ -22,7 +22,7 @@ Projector::Projector(ProjectionType projectionType) : m_projectionType(projectionType), m_prevArg(0.0f), - m_cache(0), + m_cache(nullptr), m_cacheMaster(true) { } diff --git a/sdrbase/dsp/scopevis.cpp b/sdrbase/dsp/scopevis.cpp index 989c5314b..c90ed8971 100644 --- a/sdrbase/dsp/scopevis.cpp +++ b/sdrbase/dsp/scopevis.cpp @@ -775,7 +775,7 @@ int ScopeVis::processTraces(const std::vector& vc std::vector::iterator itData = m_traces.m_tracesData.begin(); std::vector::iterator itTrace = m_traces.m_traces[m_traces.currentBufferIndex()].begin(); - for (; itCtl != m_traces.m_tracesControl.end(); ++itCtl, ++itData, ++itTrace) + for (unsigned int ti = 0; itCtl != m_traces.m_tracesControl.end(); ++itCtl, ++itData, ++itTrace, ti++) { if (traceBack && ((remainder) > itData->m_traceDelay)) { // before start of trace continue; @@ -880,15 +880,15 @@ int ScopeVis::processTraces(const std::vector& vc = traceCount - shift; // display x (*itTrace)[2*traceCount + 1] = v; // display y traceCount++; - } - } + } // process one sample + } // loop on traces for (unsigned int i = 0; i < vbegin.size(); i++) { ++vbegin[i]; } remainder--; m_nbSamples--; - } + } // loop on samples float traceTime = ((float) m_traceSize) / m_sampleRate; @@ -1149,15 +1149,16 @@ void ScopeVis::updateMaxTraceDelay() itData->m_projectionType = Projector::ProjectionReal; } - if (projectorCounts[(int) itData->m_projectionType] > 0) - { - allocateCache = true; - (*itCtrl)->m_projector.setCacheMaster(false); - } - else - { - (*itCtrl)->m_projector.setCacheMaster(true); - } + // WTF is this cache ??? Fixes issue in #872 + // if (projectorCounts[(int) itData->m_projectionType] > 0) + // { + // allocateCache = true; + // (*itCtrl)->m_projector.setCacheMaster(false); + // } + // else + // { + // (*itCtrl)->m_projector.setCacheMaster(true); + // } projectorCounts[(int) itData->m_projectionType]++; } @@ -1169,7 +1170,7 @@ void ScopeVis::updateMaxTraceDelay() if (allocateCache) { (*itCtrl)->m_projector.setCache(m_projectorCache); } else { - (*itCtrl)->m_projector.setCache(0); + (*itCtrl)->m_projector.setCache(nullptr); } }