diff layer/ColourMapper.cpp @ 1408:c8a6fd3f9dff fix-static-analysis

Use nullptr throughout
author Chris Cannam
date Mon, 26 Nov 2018 14:33:54 +0000
parents d79e21855aef
children
line wrap: on
line diff
--- a/layer/ColourMapper.cpp	Mon Nov 26 13:52:57 2018 +0000
+++ b/layer/ColourMapper.cpp	Mon Nov 26 14:33:54 2018 +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]);