Mercurial > hg > svgui
diff layer/ColourMapper.cpp @ 1417:2487521e857b
Merge
author | Chris Cannam |
---|---|
date | Wed, 23 Jan 2019 14:44:16 +0000 |
parents | c8a6fd3f9dff |
children |
line wrap: on
line diff
--- a/layer/ColourMapper.cpp Mon Jan 21 10:08:26 2019 +0000 +++ b/layer/ColourMapper.cpp Wed Jan 23 14:44:16 2019 +0000 @@ -111,8 +111,8 @@ { int n = int(colours.size()); double m = norm * (n-1); - if (m >= n-1) { colours[n-1].getRgbF(&r, &g, &b, 0); return; } - if (m <= 0) { colours[0].getRgbF(&r, &g, &b, 0); return; } + if (m >= n-1) { colours[n-1].getRgbF(&r, &g, &b, nullptr); return; } + if (m <= 0) { colours[0].getRgbF(&r, &g, &b, nullptr); return; } int base(int(floor(m))); double prop0 = (base + 1.0) - m, prop1 = m - base; QColor c0(colours[base]), c1(colours[base+1]);