mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
System : Introduce compiler warning C4458 with fixes
This commit is contained in:
parent
4009d4d63b
commit
b2d055db63
@ -283,7 +283,6 @@ if (MSVC)
|
||||
# The following warnings are supposed to be used in ResInsight, but temporarily disabled to avoid too much noise
|
||||
# warning C4245: 'return': conversion from 'int' to 'size_t', signed/unsigned mismatch
|
||||
# warning C4456: declaration of 'sourceInfo' hides previous local declaration
|
||||
# warning C4458: declaration of 'name' hides class member
|
||||
|
||||
# The following warning is generated over 800 times from a qwt header only using VS2015
|
||||
# Disabling temporarily
|
||||
@ -292,7 +291,7 @@ if (MSVC)
|
||||
# If possible, the following command is supposed to be the final target
|
||||
# set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "/W4 /wd4190 /wd4100 /wd4127")
|
||||
|
||||
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "/W4 /wd4190 /wd4100 /wd4127 /wd4505 /wd4245 /wd4456 /wd4458")
|
||||
set_target_properties(ResInsight PROPERTIES COMPILE_FLAGS "/W4 /wd4190 /wd4100 /wd4127 /wd4505 /wd4245 /wd4456")
|
||||
endif()
|
||||
|
||||
#############################################################################
|
||||
|
@ -526,19 +526,18 @@ RifReaderEclipseRft* RimEclipseResultCase::rftReader()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultCase::setGridFileName(const QString& caseFileName)
|
||||
void RimEclipseResultCase::setGridFileName(const QString& fileName)
|
||||
{
|
||||
this->caseFileName = caseFileName;
|
||||
this->caseFileName = fileName;
|
||||
}
|
||||
|
||||
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimEclipseResultCase::setCaseInfo(const QString& userDescription, const QString& caseFileName)
|
||||
void RimEclipseResultCase::setCaseInfo(const QString& userDescription, const QString& fileName)
|
||||
{
|
||||
this->caseUserDescription = userDescription;
|
||||
this->caseFileName = caseFileName;
|
||||
this->caseFileName = fileName;
|
||||
|
||||
RimProject* proj = RiaApplication::instance()->project();
|
||||
proj->assignCaseIdToCase(this);
|
||||
|
@ -41,8 +41,8 @@ public:
|
||||
RimEclipseResultCase();
|
||||
virtual ~RimEclipseResultCase();
|
||||
|
||||
void setGridFileName(const QString& caseFileName);
|
||||
void setCaseInfo(const QString& userDescription, const QString& caseFileName);
|
||||
void setGridFileName(const QString& fileName);
|
||||
void setCaseInfo(const QString& userDescription, const QString& fileName);
|
||||
void setSourSimFileName(const QString& fileName);
|
||||
bool hasSourSimFile();
|
||||
|
||||
|
@ -428,14 +428,14 @@ bool RimProject::isProjectFileVersionEqualOrOlderThan(const QString& otherProjec
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::setProjectFileNameAndUpdateDependencies(const QString& fileName)
|
||||
void RimProject::setProjectFileNameAndUpdateDependencies(const QString& projectFileName)
|
||||
{
|
||||
// Extract the filename of the project file when it was saved
|
||||
QString oldProjectFileName = this->fileName;
|
||||
// Replace with the new actual filename
|
||||
this->fileName = fileName;
|
||||
this->fileName = projectFileName;
|
||||
|
||||
QFileInfo fileInfo(fileName);
|
||||
QFileInfo fileInfo(projectFileName);
|
||||
QString newProjectPath = fileInfo.path();
|
||||
|
||||
QFileInfo fileInfoOld(oldProjectFileName);
|
||||
@ -738,12 +738,12 @@ void RimProject::scheduleCreateDisplayModelAndRedrawAllViews()
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimProject::allOilFields(std::vector<RimOilField*>& oilFields) const
|
||||
void RimProject::allOilFields(std::vector<RimOilField*>& allOilFields) const
|
||||
{
|
||||
oilFields.clear();
|
||||
allOilFields.clear();
|
||||
for (const auto& oilField : this->oilFields)
|
||||
{
|
||||
oilFields.push_back(oilField);
|
||||
allOilFields.push_back(oilField);
|
||||
}
|
||||
}
|
||||
|
||||
@ -986,10 +986,10 @@ std::vector<RimGeoMechCase*> RimProject::geoMechCases() const
|
||||
std::vector<RimFractureTemplateCollection*> RimProject::allFractureTemplateCollections() const
|
||||
{
|
||||
std::vector<RimFractureTemplateCollection*> templColls;
|
||||
std::vector<RimOilField*> oilFields;
|
||||
std::vector<RimOilField*> rimOilFields;
|
||||
|
||||
allOilFields(oilFields);
|
||||
for (RimOilField* oilField : oilFields)
|
||||
allOilFields(rimOilFields);
|
||||
for (RimOilField* oilField : rimOilFields)
|
||||
{
|
||||
templColls.push_back(oilField->fractureDefinitionCollection());
|
||||
}
|
||||
@ -1002,9 +1002,6 @@ std::vector<RimFractureTemplateCollection*> RimProject::allFractureTemplateColle
|
||||
std::vector<RimFractureTemplate*> RimProject::allFractureTemplates() const
|
||||
{
|
||||
std::vector<RimFractureTemplate*> templates;
|
||||
std::vector<RimOilField*> oilFields;
|
||||
|
||||
allOilFields(oilFields);
|
||||
for (RimFractureTemplateCollection* templColl : allFractureTemplateCollections())
|
||||
{
|
||||
for (RimFractureTemplate* templ : templColl->fractureTemplates())
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
bool isProjectFileVersionEqualOrOlderThan(const QString& otherProjectFileVersion) const;
|
||||
void close();
|
||||
|
||||
void setProjectFileNameAndUpdateDependencies(const QString& fileName);
|
||||
void setProjectFileNameAndUpdateDependencies(const QString& projectFileName);
|
||||
|
||||
void assignCaseIdToCase(RimCase* reservoirCase);
|
||||
void assignIdToCaseGroup(RimIdenticalGridCaseGroup* caseGroup);
|
||||
@ -120,7 +120,7 @@ public:
|
||||
|
||||
void computeUtmAreaOfInterest();
|
||||
|
||||
void allOilFields(std::vector<RimOilField*>& oilFields) const;
|
||||
void allOilFields(std::vector<RimOilField*>& allOilFields) const;
|
||||
RimOilField* activeOilField();
|
||||
const RimOilField* activeOilField() const;
|
||||
|
||||
|
@ -302,9 +302,9 @@ void RimWellPathCollection::readAndAddWellPaths(std::vector<RimFileWellPath*>& w
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
///
|
||||
//--------------------------------------------------------------------------------------------------
|
||||
void RimWellPathCollection::addWellPaths(const std::vector<RimWellPath*> wellPaths)
|
||||
void RimWellPathCollection::addWellPaths(const std::vector<RimWellPath*> incomingWellPaths)
|
||||
{
|
||||
for(const auto& wellPath : wellPaths)
|
||||
for(const auto& wellPath : incomingWellPaths)
|
||||
{
|
||||
this->wellPaths.push_back(wellPath);
|
||||
}
|
||||
|
@ -101,7 +101,7 @@ public:
|
||||
|
||||
RimWellPath* wellPathByName(const QString& wellPathName) const;
|
||||
RimWellPath* tryFindMatchingWellPath(const QString& wellName) const;
|
||||
void addWellPaths(const std::vector<RimWellPath*> wellPaths);
|
||||
void addWellPaths(const std::vector<RimWellPath*> incomingWellPaths);
|
||||
RimWellLogFile* addWellLogs(const QStringList& filePaths);
|
||||
void addWellPathFormations(const QStringList& filePaths);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user