mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Removed a lot of size_t/uint/int related compiler warnings. Still more to go.
p4#: 20215
This commit is contained in:
@@ -130,12 +130,12 @@ void RimCellRangeFilter::setDefaultValues()
|
||||
max.y() = max.y() + 1;
|
||||
max.z() = max.z() + 1;
|
||||
|
||||
startIndexI = min.x();
|
||||
startIndexJ = min.y();
|
||||
startIndexK = min.z();
|
||||
cellCountI = max.x() - min.x() + 1;
|
||||
cellCountJ = max.y() - min.y() + 1;
|
||||
cellCountK = max.z() - min.z() + 1;
|
||||
startIndexI = static_cast<int>(min.x());
|
||||
startIndexJ = static_cast<int>(min.y());
|
||||
startIndexK = static_cast<int>(min.z());
|
||||
cellCountI = static_cast<int>(max.x() - min.x() + 1);
|
||||
cellCountJ = static_cast<int>(max.y() - min.y() + 1);
|
||||
cellCountK = static_cast<int>(max.z() - min.z() + 1);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -183,17 +183,17 @@ void RimCellRangeFilter::defineEditorAttribute(const caf::PdmFieldHandle* field,
|
||||
if (field == &startIndexI || field == &cellCountI)
|
||||
{
|
||||
myAttr->m_minimum = 1;
|
||||
myAttr->m_maximum = mainGrid->cellCountI();
|
||||
myAttr->m_maximum = static_cast<int>(mainGrid->cellCountI());
|
||||
}
|
||||
else if (field == &startIndexJ || field == &cellCountJ)
|
||||
{
|
||||
myAttr->m_minimum = 1;
|
||||
myAttr->m_maximum = mainGrid->cellCountJ();
|
||||
myAttr->m_maximum = static_cast<int>(mainGrid->cellCountJ());
|
||||
}
|
||||
else if (field == &startIndexK || field == &cellCountK)
|
||||
{
|
||||
myAttr->m_minimum = 1;
|
||||
myAttr->m_maximum = mainGrid->cellCountK();
|
||||
myAttr->m_maximum = static_cast<int>(mainGrid->cellCountK());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -215,12 +215,12 @@ void RimInputReservoir::loadAndSyncronizeInputProperties()
|
||||
|
||||
size_t inputPropCount = this->m_inputPropertyCollection()->inputProperties.size();
|
||||
|
||||
caf::ProgressInfo progInfo(filenames.size() *( inputPropCount + knownKeywords.size()), "Reading Input properties" );
|
||||
caf::ProgressInfo progInfo(static_cast<int>(filenames.size() *( inputPropCount + knownKeywords.size())), "Reading Input properties" );
|
||||
int progress = 0;
|
||||
|
||||
for_all(filenames, i)
|
||||
{
|
||||
progress = i*( inputPropCount + knownKeywords.size());
|
||||
progress = static_cast<int>(i*( inputPropCount + knownKeywords.size()));
|
||||
// Find all the keywords present on the file
|
||||
|
||||
progInfo.setProgressDescription(filenames[i]);
|
||||
@@ -262,10 +262,10 @@ void RimInputReservoir::loadAndSyncronizeInputProperties()
|
||||
fileKeywordSet.erase(kw);
|
||||
}
|
||||
|
||||
progInfo.setProgress(progress + ipIdx );
|
||||
progInfo.setProgress(static_cast<int>(progress + ipIdx) );
|
||||
}
|
||||
|
||||
progInfo.setProgress(progress + inputPropCount);
|
||||
progInfo.setProgress(static_cast<int>(progress + inputPropCount));
|
||||
// Check if there are more known property keywords left on file. If it is, read them and create inputProperty objects
|
||||
|
||||
if (!fileKeywordSet.empty())
|
||||
@@ -288,7 +288,7 @@ void RimInputReservoir::loadAndSyncronizeInputProperties()
|
||||
m_inputPropertyCollection->inputProperties.push_back(inputProperty);
|
||||
}
|
||||
}
|
||||
progInfo.setProgress(progress + inputPropCount + fkIt);
|
||||
progInfo.setProgress(static_cast<int>(progress + inputPropCount + fkIt));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -614,8 +614,7 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
geometriesToRecolor.push_back(RivReservoirViewPartMgr::ALL_WELL_CELLS);
|
||||
}
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < geometriesToRecolor.size(); ++i)
|
||||
for (size_t i = 0; i < geometriesToRecolor.size(); ++i)
|
||||
{
|
||||
|
||||
if (this->animationMode() && this->cellEdgeResult()->hasResult())
|
||||
@@ -640,7 +639,7 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
{
|
||||
cvf::String modelName = "WellPipeModel";
|
||||
std::vector<cvf::Model*> models;
|
||||
for (i = 0; i < frameScene->modelCount(); i++)
|
||||
for (cvf::uint i = 0; i < frameScene->modelCount(); i++)
|
||||
{
|
||||
if (frameScene->model(i)->name() == modelName)
|
||||
{
|
||||
@@ -648,7 +647,7 @@ void RimReservoirView::updateCurrentTimeStep()
|
||||
}
|
||||
}
|
||||
|
||||
for (i = 0; i < models.size(); i++)
|
||||
for (size_t i = 0; i < models.size(); i++)
|
||||
{
|
||||
frameScene->removeModel(models[i]);
|
||||
}
|
||||
@@ -862,8 +861,7 @@ void RimReservoirView::appendCellResultInfo(size_t gridIndex, size_t cellIndex,
|
||||
this->cellEdgeResult()->gridScalarIndices(resultIndices);
|
||||
this->cellEdgeResult()->gridScalarResultNames(&resultNames);
|
||||
|
||||
size_t idx;
|
||||
for (idx = 0; idx < 6; idx++)
|
||||
for (int idx = 0; idx < 6; idx++)
|
||||
{
|
||||
if (resultIndices[idx] == cvf::UNDEFINED_SIZE_T) continue;
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ RimReservoirView* RimUiTreeModelPdm::addReservoirView(const QModelIndex& itemInd
|
||||
RimReservoirView* insertedView = reservoirView->eclipseCase()->createAndAddReservoirView();
|
||||
caf::PdmUiTreeItem* collectionItem = currentItem->parent();
|
||||
|
||||
size_t viewCount = rowCount(itemIndex.parent());
|
||||
int viewCount = rowCount(itemIndex.parent());
|
||||
beginInsertRows(itemIndex.parent(), viewCount, viewCount);
|
||||
|
||||
caf::PdmUiTreeItem* childItem = new caf::PdmUiTreeItem(collectionItem, viewCount, insertedView);
|
||||
|
||||
Reference in New Issue
Block a user