chore(cpn): Remove some compiler warnings (#2752)
This commit is contained in:
@@ -285,7 +285,7 @@ RawSource YamlRawSourceDecode(const std::string& src_str)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (node.IsScalar() && node.as<std::string>().size() == 12 && node.as<std::string>().substr(0, 11) == "SPACEMOUSE_") {
|
if (node.IsScalar() && node.as<std::string>().size() == 12 && node.as<std::string>().substr(0, 11) == "SPACEMOUSE_") {
|
||||||
int sm_idx;
|
int sm_idx = 0;
|
||||||
node >> spacemouseLut >> sm_idx;
|
node >> spacemouseLut >> sm_idx;
|
||||||
if (sm_idx >= 0) {
|
if (sm_idx >= 0) {
|
||||||
rhs.type = SOURCE_TYPE_SPACEMOUSE;
|
rhs.type = SOURCE_TYPE_SPACEMOUSE;
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ bool RadioData::deleteLabel(int index)
|
|||||||
|
|
||||||
bool RadioData::renameLabel(QString from, QString to)
|
bool RadioData::renameLabel(QString from, QString to)
|
||||||
{
|
{
|
||||||
bool success = true;
|
bool success = true;
|
||||||
QString csvFrom = escapeCSV(from);
|
QString csvFrom = escapeCSV(from);
|
||||||
QString csvTo = escapeCSV(to);
|
QString csvTo = escapeCSV(to);
|
||||||
int lengthdiff = csvTo.size() - csvFrom.size();
|
int lengthdiff = csvTo.size() - csvFrom.size();
|
||||||
@@ -218,7 +218,7 @@ void RadioData::swapLabel(int indFrom, int indTo)
|
|||||||
|
|
||||||
bool RadioData::addLabelToModel(int index, QString label)
|
bool RadioData::addLabelToModel(int index, QString label)
|
||||||
{
|
{
|
||||||
if (index >= models.size()) return false;
|
if ((unsigned int)index >= models.size()) return false;
|
||||||
label = escapeCSV(label);
|
label = escapeCSV(label);
|
||||||
|
|
||||||
char *modelLabelCsv = models[index].labels;
|
char *modelLabelCsv = models[index].labels;
|
||||||
@@ -237,7 +237,7 @@ bool RadioData::addLabelToModel(int index, QString label)
|
|||||||
|
|
||||||
bool RadioData::removeLabelFromModel(int index, QString label)
|
bool RadioData::removeLabelFromModel(int index, QString label)
|
||||||
{
|
{
|
||||||
if (index >= models.size()) return false;
|
if ((unsigned int)index >= models.size()) return false;
|
||||||
|
|
||||||
QStringList lbls = fromCSV(QString::fromUtf8(models[index].labels));
|
QStringList lbls = fromCSV(QString::fromUtf8(models[index].labels));
|
||||||
if (lbls.indexOf(label) >= 0) {
|
if (lbls.indexOf(label) >= 0) {
|
||||||
|
|||||||
@@ -507,8 +507,6 @@ void MdiChild::adjustToolbarLayout()
|
|||||||
|
|
||||||
void MdiChild::initModelsList()
|
void MdiChild::initModelsList()
|
||||||
{
|
{
|
||||||
Board::Type board = firmware->getBoard();
|
|
||||||
|
|
||||||
if (modelsListModel)
|
if (modelsListModel)
|
||||||
delete modelsListModel;
|
delete modelsListModel;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user