mirror of
https://github.com/OPM/ResInsight.git
synced 2026-09-03 20:53:13 -05:00
Removed even more compiler warnings.
p4#: 20220
This commit is contained in:
@@ -455,7 +455,7 @@ void RifEclipseInputFileTools::writeDataToTextFile(QFile* file, const QString& e
|
|||||||
out << eclipseKeyWord << "\n" << right << qSetFieldWidth(16);
|
out << eclipseKeyWord << "\n" << right << qSetFieldWidth(16);
|
||||||
|
|
||||||
caf::ProgressInfo pi(resultData.size(), QString("Writing data to file %1").arg(file->fileName()) );
|
caf::ProgressInfo pi(resultData.size(), QString("Writing data to file %1").arg(file->fileName()) );
|
||||||
int progressSteps = resultData.size() / 20;
|
size_t progressSteps = resultData.size() / 20;
|
||||||
|
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < resultData.size(); i++)
|
for (i = 0; i < resultData.size(); i++)
|
||||||
|
|||||||
@@ -84,11 +84,11 @@ void RifEclipseOutputFileTools::close()
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
/// Get the number of occurrences of the given keyword
|
/// Get the number of occurrences of the given keyword
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
size_t RifEclipseOutputFileTools::numOccurrences(const QString& keyword)
|
int RifEclipseOutputFileTools::numOccurrences(const QString& keyword)
|
||||||
{
|
{
|
||||||
#ifdef USE_ECL_LIB
|
#ifdef USE_ECL_LIB
|
||||||
CVF_ASSERT(m_file);
|
CVF_ASSERT(m_file);
|
||||||
return (size_t) ecl_file_get_num_named_kw(m_file, keyword.toAscii().data());
|
return ecl_file_get_num_named_kw(m_file, keyword.toAscii().data());
|
||||||
#else
|
#else
|
||||||
return 0;
|
return 0;
|
||||||
#endif //USE_ECL_LIB
|
#endif //USE_ECL_LIB
|
||||||
@@ -175,10 +175,10 @@ bool RifEclipseOutputFileTools::timeStepsText(QStringList* timeSteps)
|
|||||||
const char* KW_INTEHEAD = "INTEHEAD";
|
const char* KW_INTEHEAD = "INTEHEAD";
|
||||||
|
|
||||||
// Get the number of occurrences of the INTEHEAD keyword
|
// Get the number of occurrences of the INTEHEAD keyword
|
||||||
size_t numINTEHEAD = numOccurrences(KW_INTEHEAD);
|
int numINTEHEAD = numOccurrences(KW_INTEHEAD);
|
||||||
|
|
||||||
QStringList timeStepsFound;
|
QStringList timeStepsFound;
|
||||||
size_t i;
|
int i;
|
||||||
for (i = 0; i < numINTEHEAD; i++)
|
for (i = 0; i < numINTEHEAD; i++)
|
||||||
{
|
{
|
||||||
ecl_kw_type* kwINTEHEAD = ecl_file_iget_named_kw(m_file, KW_INTEHEAD, i);
|
ecl_kw_type* kwINTEHEAD = ecl_file_iget_named_kw(m_file, KW_INTEHEAD, i);
|
||||||
@@ -222,10 +222,10 @@ bool RifEclipseOutputFileTools::timeSteps(QList<QDateTime>* timeSteps)
|
|||||||
const char* KW_INTEHEAD = "INTEHEAD";
|
const char* KW_INTEHEAD = "INTEHEAD";
|
||||||
|
|
||||||
// Get the number of occurrences of the INTEHEAD keyword
|
// Get the number of occurrences of the INTEHEAD keyword
|
||||||
size_t numINTEHEAD = numOccurrences(KW_INTEHEAD);
|
int numINTEHEAD = numOccurrences(KW_INTEHEAD);
|
||||||
|
|
||||||
QList<QDateTime> timeStepsFound;
|
QList<QDateTime> timeStepsFound;
|
||||||
size_t i;
|
int i;
|
||||||
for (i = 0; i < numINTEHEAD; i++)
|
for (i = 0; i < numINTEHEAD; i++)
|
||||||
{
|
{
|
||||||
ecl_kw_type* kwINTEHEAD = ecl_file_iget_named_kw(m_file, KW_INTEHEAD, i);
|
ecl_kw_type* kwINTEHEAD = ecl_file_iget_named_kw(m_file, KW_INTEHEAD, i);
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ public:
|
|||||||
bool open(const QString& fileName);
|
bool open(const QString& fileName);
|
||||||
void close();
|
void close();
|
||||||
|
|
||||||
size_t numOccurrences(const QString& keyword);
|
int numOccurrences(const QString& keyword);
|
||||||
bool keywordsOnFile(QStringList* keywords, size_t numDataItems = cvf::UNDEFINED_SIZE_T, size_t numSteps = cvf::UNDEFINED_SIZE_T);
|
bool keywordsOnFile(QStringList* keywords, size_t numDataItems = cvf::UNDEFINED_SIZE_T, size_t numSteps = cvf::UNDEFINED_SIZE_T);
|
||||||
|
|
||||||
bool timeStepsText(QStringList* timeSteps);
|
bool timeStepsText(QStringList* timeSteps);
|
||||||
|
|||||||
@@ -360,7 +360,7 @@ bool RifReaderEclipseOutput::buildMetaData(RigReservoir* reservoir)
|
|||||||
// Get the names of the dynamic results
|
// Get the names of the dynamic results
|
||||||
QStringList dynamicResultNames = m_dynamicResultsAccess->resultNames();
|
QStringList dynamicResultNames = m_dynamicResultsAccess->resultNames();
|
||||||
|
|
||||||
for (size_t i = 0; i < static_cast<size_t>(dynamicResultNames.size()); ++i)
|
for (int i = 0; i < dynamicResultNames.size(); ++i)
|
||||||
{
|
{
|
||||||
size_t resIndex = resCellResults->addEmptyScalarResult(RimDefines::DYNAMIC_NATIVE, dynamicResultNames[i]);
|
size_t resIndex = resCellResults->addEmptyScalarResult(RimDefines::DYNAMIC_NATIVE, dynamicResultNames[i]);
|
||||||
resCellResults->setTimeStepDates(resIndex, m_timeSteps);
|
resCellResults->setTimeStepDates(resIndex, m_timeSteps);
|
||||||
@@ -390,7 +390,7 @@ bool RifReaderEclipseOutput::buildMetaData(RigReservoir* reservoir)
|
|||||||
staticDate.push_back(m_timeSteps.front());
|
staticDate.push_back(m_timeSteps.front());
|
||||||
}
|
}
|
||||||
|
|
||||||
for (size_t i = 0; i < static_cast<size_t>(staticResultNames.size()); ++i)
|
for (int i = 0; i < staticResultNames.size(); ++i)
|
||||||
{
|
{
|
||||||
size_t resIndex = resCellResults->addEmptyScalarResult(RimDefines::STATIC_NATIVE, staticResultNames[i]);
|
size_t resIndex = resCellResults->addEmptyScalarResult(RimDefines::STATIC_NATIVE, staticResultNames[i]);
|
||||||
resCellResults->setTimeStepDates(resIndex, staticDate);
|
resCellResults->setTimeStepDates(resIndex, staticDate);
|
||||||
@@ -566,7 +566,7 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
|||||||
bool hasWellConnectionsInLGR = false;
|
bool hasWellConnectionsInLGR = false;
|
||||||
for (size_t gridNr = 1; gridNr < grids.size(); ++gridNr)
|
for (size_t gridNr = 1; gridNr < grids.size(); ++gridNr)
|
||||||
{
|
{
|
||||||
int branchCount = well_state_iget_lgr_num_branches(ert_well_state, gridNr);
|
int branchCount = well_state_iget_lgr_num_branches(ert_well_state, static_cast<int>(gridNr));
|
||||||
if (branchCount > 0)
|
if (branchCount > 0)
|
||||||
{
|
{
|
||||||
hasWellConnectionsInLGR = true;
|
hasWellConnectionsInLGR = true;
|
||||||
@@ -578,7 +578,7 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
|||||||
{
|
{
|
||||||
|
|
||||||
// Wellhead. If several grids have a wellhead definition for this well, we use tha last one. (Possibly the innermost LGR)
|
// Wellhead. If several grids have a wellhead definition for this well, we use tha last one. (Possibly the innermost LGR)
|
||||||
const well_conn_type* ert_wellhead = well_state_iget_wellhead(ert_well_state, gridNr);
|
const well_conn_type* ert_wellhead = well_state_iget_wellhead(ert_well_state, static_cast<int>(gridNr));
|
||||||
if (ert_wellhead)
|
if (ert_wellhead)
|
||||||
{
|
{
|
||||||
wellResFrame.m_wellHead.m_gridIndex = gridNr;
|
wellResFrame.m_wellHead.m_gridIndex = gridNr;
|
||||||
@@ -589,7 +589,7 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int branchCount = well_state_iget_lgr_num_branches(ert_well_state, gridNr);
|
int branchCount = well_state_iget_lgr_num_branches(ert_well_state, static_cast<int>(gridNr));
|
||||||
if (branchCount > 0)
|
if (branchCount > 0)
|
||||||
{
|
{
|
||||||
if (static_cast<int>(wellResFrame.m_wellResultBranches.size()) < branchCount) wellResFrame.m_wellResultBranches.resize(branchCount);
|
if (static_cast<int>(wellResFrame.m_wellResultBranches.size()) < branchCount) wellResFrame.m_wellResultBranches.resize(branchCount);
|
||||||
@@ -597,7 +597,7 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
|||||||
for (int branchIdx = 0; branchIdx < branchCount; ++branchIdx )
|
for (int branchIdx = 0; branchIdx < branchCount; ++branchIdx )
|
||||||
{
|
{
|
||||||
// Connections
|
// Connections
|
||||||
int connectionCount = well_state_iget_num_lgr_connections(ert_well_state, gridNr, branchIdx);
|
int connectionCount = well_state_iget_num_lgr_connections(ert_well_state, static_cast<int>(gridNr), branchIdx);
|
||||||
if (connectionCount > 0)
|
if (connectionCount > 0)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -609,7 +609,7 @@ void RifReaderEclipseOutput::readWellCells(RigReservoir* reservoir)
|
|||||||
int connIdx;
|
int connIdx;
|
||||||
for (connIdx = 0; connIdx < connectionCount; connIdx++)
|
for (connIdx = 0; connIdx < connectionCount; connIdx++)
|
||||||
{
|
{
|
||||||
const well_conn_type* ert_connection = well_state_iget_lgr_connections( ert_well_state, gridNr, branchIdx)[connIdx];
|
const well_conn_type* ert_connection = well_state_iget_lgr_connections( ert_well_state, static_cast<int>(gridNr), branchIdx)[connIdx];
|
||||||
CVF_ASSERT(ert_connection);
|
CVF_ASSERT(ert_connection);
|
||||||
|
|
||||||
RigWellResultCell& data = wellSegment.m_wellCells[existingConnCount + connIdx];
|
RigWellResultCell& data = wellSegment.m_wellCells[existingConnCount + connIdx];
|
||||||
|
|||||||
@@ -222,7 +222,7 @@ cvf::ref<cvf::DrawableGeo> RivPipeGeometryGenerator::generateLine(const cvf::Vec
|
|||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < duplicateVertexCount; i++)
|
for (i = 0; i < duplicateVertexCount; i++)
|
||||||
{
|
{
|
||||||
indices->set(i, i);
|
indices->set(i, static_cast<cvf::uint>(i));
|
||||||
}
|
}
|
||||||
|
|
||||||
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
cvf::ref<cvf::DrawableGeo> geo = new cvf::DrawableGeo;
|
||||||
|
|||||||
@@ -1282,7 +1282,7 @@ bool DrawableGeo::rayIntersect(const Ray& ray, Vec3d* intersectionPoint, uint* f
|
|||||||
|
|
||||||
size_t numPrimitiveSets = m_primitiveSets.size();
|
size_t numPrimitiveSets = m_primitiveSets.size();
|
||||||
size_t iPrimSet;
|
size_t iPrimSet;
|
||||||
size_t accumulatedFaceCount = 0;
|
int accumulatedFaceCount = 0;
|
||||||
|
|
||||||
for (iPrimSet = 0; iPrimSet < numPrimitiveSets; iPrimSet++)
|
for (iPrimSet = 0; iPrimSet < numPrimitiveSets; iPrimSet++)
|
||||||
{
|
{
|
||||||
@@ -1347,7 +1347,7 @@ bool DrawableGeo::rayIntersect(const Ray& ray, Vec3dArray* intersectionPoints, U
|
|||||||
std::vector<uint> faceIndices;
|
std::vector<uint> faceIndices;
|
||||||
|
|
||||||
cref<Vec3fArray> vertexArr = m_vertexBundle->vertexArray();
|
cref<Vec3fArray> vertexArr = m_vertexBundle->vertexArray();
|
||||||
size_t accumulatedFaceCount = 0;
|
int accumulatedFaceCount = 0;
|
||||||
|
|
||||||
size_t numPrimitiveSets = m_primitiveSets.size();
|
size_t numPrimitiveSets = m_primitiveSets.size();
|
||||||
size_t iPrimSet;
|
size_t iPrimSet;
|
||||||
|
|||||||
Reference in New Issue
Block a user