Mercurial > hg > svgui
comparison layer/Colour3DPlotLayer.cpp @ 843:db0759e4c6c3
Fix some (probably benign) uninitialised members (from coverity scan)
author | Chris Cannam |
---|---|
date | Wed, 03 Sep 2014 11:31:09 +0100 |
parents | 2d4af227fd32 |
children | 3ca3b8fbbcee |
comparison
equal
deleted
inserted
replaced
841:532302d04571 | 843:db0759e4c6c3 |
---|---|
107 } | 107 } |
108 | 108 |
109 void | 109 void |
110 Colour3DPlotLayer::cacheInvalid(int startFrame, int endFrame) | 110 Colour3DPlotLayer::cacheInvalid(int startFrame, int endFrame) |
111 { | 111 { |
112 if (!m_cache) return; | 112 if (!m_cache || !m_model) return; |
113 | 113 |
114 int modelResolution = m_model->getResolution(); | 114 int modelResolution = m_model->getResolution(); |
115 int start = startFrame / modelResolution; | 115 int start = startFrame / modelResolution; |
116 int end = endFrame / modelResolution + 1; | 116 int end = endFrame / modelResolution + 1; |
117 if (m_cacheValidStart < end) m_cacheValidStart = end; | 117 if (m_cacheValidStart < end) m_cacheValidStart = end; |
1527 float sx0 = sxa[x*2]; | 1527 float sx0 = sxa[x*2]; |
1528 if (sx0 < 0) continue; | 1528 if (sx0 < 0) continue; |
1529 int sx0i = int(sx0 + epsilon); | 1529 int sx0i = int(sx0 + epsilon); |
1530 if (sx0i >= sw) break; | 1530 if (sx0i >= sw) break; |
1531 | 1531 |
1532 float a, b, value; | 1532 float a = float(sourceLine[sx0i]); |
1533 float b = a; | |
1534 float value; | |
1533 | 1535 |
1534 float sx1 = sxa[x*2+1]; | 1536 float sx1 = sxa[x*2+1]; |
1535 if (sx1 > sx0 + 1.f) { | 1537 if (sx1 > sx0 + 1.f) { |
1536 int sx1i = int(sx1); | 1538 int sx1i = int(sx1); |
1537 bool have = false; | 1539 bool have = false; |