Fixed Linux comiler warnings

This commit is contained in:
Jacob Støren
2017-01-10 08:48:58 +01:00
parent 95b7ce73ee
commit 396069ae28
2 changed files with 4 additions and 4 deletions

View File

@@ -771,9 +771,9 @@ void RimLegendConfig::setNamedCategories(const std::vector<QString>& categoryNam
std::vector<int> nameIndices;
std::vector<cvf::String> names;
for ( int i = 0; i < categoryNames.size(); ++i )
for ( size_t i = 0; i < categoryNames.size(); ++i )
{
nameIndices.push_back(i);
nameIndices.push_back(static_cast<int>(i));
names.push_back(cvfqt::Utils::toString(categoryNames[i]));
}

View File

@@ -265,11 +265,11 @@ std::vector<double>* RigFlowDiagResults::calculateTracerWithMaxFractionResult(co
int selTracerIdx = 0;
for ( const std::string& tracerName: resVarAddr.selectedTracerNames )
{
for ( int globIdx = 0; globIdx < allTracerNames.size(); ++globIdx )
for ( size_t globIdx = 0; globIdx < allTracerNames.size(); ++globIdx )
{
if ( allTracerNames[globIdx].toStdString() == tracerName )
{
selectedTracerIdxToGlobalTracerIdx[selTracerIdx] = globIdx;
selectedTracerIdxToGlobalTracerIdx[selTracerIdx] = static_cast<int>(globIdx);
break;
}
}