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)
|
||||
{
|
||||
const StringTagMappingTable& lut = getAnalogNamesLookupTable(board);
|
||||
if (index < lut.size())
|
||||
if (index < (int)lut.size())
|
||||
return QString::fromStdString(lut[index].name);
|
||||
|
||||
return CPN_STR_UNKNOWN_ITEM;
|
||||
|
||||
@@ -67,13 +67,13 @@ bool loadModelsListFromYaml(std::vector<CategoryData>& categories,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (const std::runtime_error& e) {
|
||||
qDebug() << "YAML::ParserException: " << e.what();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool loadModelFromYaml(ModelData& model, const QByteArray& data)
|
||||
@@ -116,7 +116,7 @@ bool writeModelsListToYaml(const std::vector<CategoryData>& categories,
|
||||
YAML::Node cat_attrs;
|
||||
cat_attrs["filename"] = modelFile.first;
|
||||
|
||||
if (modelFile.second >= categories.size()) {
|
||||
if (modelFile.second >= (int)categories.size()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ bool writeModelToYaml(const ModelData& model, QByteArray& data)
|
||||
{
|
||||
YAML::Node node;
|
||||
node = model;
|
||||
|
||||
|
||||
writeYamlToByteArray(node, data);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user