comparison widgets/PluginParameterBox.cpp @ 1414:fa986b91d77f

Merge from branch fix-static-analysis
author Chris Cannam
date Wed, 09 Jan 2019 15:24:51 +0000
parents c8a6fd3f9dff
children 11660e0c896f
comparison
equal deleted inserted replaced
1413:0930a27ebea2 1414:fa986b91d77f
35 #include <cmath> 35 #include <cmath>
36 36
37 PluginParameterBox::PluginParameterBox(Vamp::PluginBase *plugin, QWidget *parent) : 37 PluginParameterBox::PluginParameterBox(Vamp::PluginBase *plugin, QWidget *parent) :
38 QFrame(parent), 38 QFrame(parent),
39 m_plugin(plugin), 39 m_plugin(plugin),
40 m_programCombo(0) 40 m_programCombo(nullptr)
41 { 41 {
42 m_layout = new QGridLayout; 42 m_layout = new QGridLayout;
43 setLayout(m_layout); 43 setLayout(m_layout);
44 populate(); 44 populate();
45 } 45 }
141 } 141 }
142 m_layout->addWidget(label, i + offset, 0); 142 m_layout->addWidget(label, i + offset, 0);
143 143
144 ParamRec rec; 144 ParamRec rec;
145 rec.param = params[i]; 145 rec.param = params[i];
146 rec.dial = 0; 146 rec.dial = nullptr;
147 rec.spin = 0; 147 rec.spin = nullptr;
148 rec.check = 0; 148 rec.check = nullptr;
149 rec.combo = 0; 149 rec.combo = nullptr;
150 150
151 if (params[i].isQuantized && !valueNames.empty()) { 151 if (params[i].isQuantized && !valueNames.empty()) {
152 152
153 QComboBox *combobox = new QComboBox; 153 QComboBox *combobox = new QComboBox;
154 combobox->setObjectName(identifier); 154 combobox->setObjectName(identifier);
189 SVCERR << "WARNING: for parameter \"" << name 189 SVCERR << "WARNING: for parameter \"" << name
190 << "\" of plugin \"" << m_plugin->getName() 190 << "\" of plugin \"" << m_plugin->getName()
191 << "\": invalid range " << min << " -> " << max 191 << "\": invalid range " << min << " -> " << max
192 << " with quantize step " << qtz << endl; 192 << " with quantize step " << qtz << endl;
193 } else { 193 } else {
194 RangeMapper *rm = 0; 194 RangeMapper *rm = nullptr;
195 if (hint & PortHint::Logarithmic) { 195 if (hint & PortHint::Logarithmic) {
196 rm = new LogRangeMapper(imin, imax, min, max, unit); 196 rm = new LogRangeMapper(imin, imax, min, max, unit);
197 } else { 197 } else {
198 rm = new LinearRangeMapper(imin, imax, min, max, unit); 198 rm = new LinearRangeMapper(imin, imax, min, max, unit);
199 } 199 }