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:
@@ -34,16 +34,16 @@ TEST(RigReservoirTest, BasicTest)
|
||||
|
||||
QDateTime wellStartTime = QDateTime::currentDateTime();
|
||||
|
||||
size_t wellTimeStepCount = 5;
|
||||
int wellTimeStepCount = 5;
|
||||
wellCellTimeHistory->m_wellCellsTimeSteps.resize(wellTimeStepCount);
|
||||
|
||||
size_t i;
|
||||
int i;
|
||||
for (i = 0; i < wellTimeStepCount; i++)
|
||||
{
|
||||
wellCellTimeHistory->m_wellCellsTimeSteps[i].m_timestamp = QDateTime(wellStartTime).addYears(i);
|
||||
}
|
||||
|
||||
size_t resultTimeStepCount = 2 * wellTimeStepCount;
|
||||
int resultTimeStepCount = 2 * wellTimeStepCount;
|
||||
QList<QDateTime> resultTimes;
|
||||
for (i = 0; i < resultTimeStepCount; i++)
|
||||
{
|
||||
|
||||
@@ -313,14 +313,14 @@ void RigMainGrid::calculateActiveCellInfo(std::vector<qint32> &gridNumber,
|
||||
parentGrid->ijkFromCellIndex(parentCellIdx, &pi, &pj, &pk);
|
||||
}
|
||||
|
||||
gridNumber.push_back(grid->gridIndex());
|
||||
cellI.push_back(i);
|
||||
cellJ.push_back(j);
|
||||
cellK.push_back(k);
|
||||
parentGridNumber.push_back(parentGrid->gridIndex());
|
||||
hostCellI.push_back(pi);
|
||||
hostCellJ.push_back(pj);
|
||||
hostCellK.push_back(pk);
|
||||
gridNumber.push_back(static_cast<qint32>(grid->gridIndex()));
|
||||
cellI.push_back(static_cast<qint32>(i));
|
||||
cellJ.push_back(static_cast<qint32>(j));
|
||||
cellK.push_back(static_cast<qint32>(k));
|
||||
parentGridNumber.push_back(static_cast<qint32>(parentGrid->gridIndex()));
|
||||
hostCellI.push_back(static_cast<qint32>(pi));
|
||||
hostCellJ.push_back(static_cast<qint32>(pj));
|
||||
hostCellK.push_back(static_cast<qint32>(pk));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -665,7 +665,7 @@ bool RigReservoirCellResults::isUsingGlobalActiveIndex(size_t scalarResultIndex)
|
||||
QDateTime RigReservoirCellResults::timeStepDate(size_t scalarResultIndex, size_t timeStepIndex) const
|
||||
{
|
||||
if (scalarResultIndex < m_resultInfos.size() && (size_t)(m_resultInfos[scalarResultIndex].m_timeStepDates.size()) > timeStepIndex)
|
||||
return m_resultInfos[scalarResultIndex].m_timeStepDates[timeStepIndex];
|
||||
return m_resultInfos[scalarResultIndex].m_timeStepDates[static_cast<int>(timeStepIndex)];
|
||||
else
|
||||
return QDateTime();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user