Fix compiler warnings
This commit is contained in:
committed by
Raphael Coeffic
parent
d0089232ff
commit
2d47701b72
@@ -583,7 +583,7 @@ StringTagMappingTable Boards::getAnalogNamesLookupTable(Board::Type board)
|
|||||||
QString Boards::getAnalogInputName(Board::Type board, int index)
|
QString Boards::getAnalogInputName(Board::Type board, int index)
|
||||||
{
|
{
|
||||||
const StringTagMappingTable& lut = getAnalogNamesLookupTable(board);
|
const StringTagMappingTable& lut = getAnalogNamesLookupTable(board);
|
||||||
if (index < lut.size())
|
if (index < (int)lut.size())
|
||||||
return QString::fromStdString(lut[index].name);
|
return QString::fromStdString(lut[index].name);
|
||||||
|
|
||||||
return CPN_STR_UNKNOWN_ITEM;
|
return CPN_STR_UNKNOWN_ITEM;
|
||||||
|
|||||||
@@ -67,13 +67,13 @@ bool loadModelsListFromYaml(std::vector<CategoryData>& categories,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (const std::runtime_error& e) {
|
} catch (const std::runtime_error& e) {
|
||||||
qDebug() << "YAML::ParserException: " << e.what();
|
qDebug() << "YAML::ParserException: " << e.what();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool loadModelFromYaml(ModelData& model, const QByteArray& data)
|
bool loadModelFromYaml(ModelData& model, const QByteArray& data)
|
||||||
@@ -116,7 +116,7 @@ bool writeModelsListToYaml(const std::vector<CategoryData>& categories,
|
|||||||
YAML::Node cat_attrs;
|
YAML::Node cat_attrs;
|
||||||
cat_attrs["filename"] = modelFile.first;
|
cat_attrs["filename"] = modelFile.first;
|
||||||
|
|
||||||
if (modelFile.second >= categories.size()) {
|
if (modelFile.second >= (int)categories.size()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ bool writeModelToYaml(const ModelData& model, QByteArray& data)
|
|||||||
{
|
{
|
||||||
YAML::Node node;
|
YAML::Node node;
|
||||||
node = model;
|
node = model;
|
||||||
|
|
||||||
writeYamlToByteArray(node, data);
|
writeYamlToByteArray(node, data);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user