Mercurial > hg > svgui
diff widgets/PluginParameterBox.cpp @ 249:e6d0b097d102 sv1-1.0rc1
* more compile warning fixes
author | Chris Cannam |
---|---|
date | Mon, 30 Apr 2007 14:06:45 +0000 |
parents | 8495187c13ce |
children | 15b8a4bfe855 |
line wrap: on
line diff
--- a/widgets/PluginParameterBox.cpp Mon Apr 30 13:36:23 2007 +0000 +++ b/widgets/PluginParameterBox.cpp Mon Apr 30 14:06:45 2007 +0000 @@ -69,7 +69,7 @@ QComboBox *programCombo = new QComboBox; programCombo->setMaxVisibleItems(20); - for (int i = 0; i < programs.size(); ++i) { + for (size_t i = 0; i < programs.size(); ++i) { programCombo->addItem(programs[i].c_str()); if (programs[i] == currentProgram) { programCombo->setCurrentIndex(i); @@ -133,7 +133,7 @@ combobox->setObjectName(identifier); for (unsigned int j = 0; j < valueNames.size(); ++j) { combobox->addItem(valueNames[j].c_str()); - if (lrintf((value - min) / qtz) == j) { + if ((unsigned int)(lrintf(fabsf((value - min) / qtz))) == j) { combobox->setCurrentIndex(j); } } @@ -301,7 +301,7 @@ value = min + step * qtz; } - int imin = 0, imax = 100; + int imax = 100; if (qtz > 0.0) { imax = int((max - min) / qtz); @@ -309,7 +309,7 @@ qtz = (max - min) / 100.0; } - int ival = (value - min) / qtz; + int ival = lrintf((value - min) / qtz); AudioDial *dial = m_params[identifier].dial; if (dial) { @@ -359,7 +359,7 @@ if (i->second.combo) { i->second.combo->blockSignals(true); - i->second.combo->setCurrentIndex(value); + i->second.combo->setCurrentIndex(lrintf(value)); i->second.combo->blockSignals(false); } }