mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
Fixed some CppCheck Performance warnings
This commit is contained in:
parent
ba2e4ca3f2
commit
b00ad4ba4a
@ -52,7 +52,7 @@ RifEclipseOutputFileTools::~RifEclipseOutputFileTools()
|
|||||||
|
|
||||||
struct KeywordItemCounter
|
struct KeywordItemCounter
|
||||||
{
|
{
|
||||||
KeywordItemCounter(std::string keyword, size_t aggregatedItemCount)
|
KeywordItemCounter(const std::string& keyword, size_t aggregatedItemCount)
|
||||||
: m_keyword(keyword),
|
: m_keyword(keyword),
|
||||||
m_aggregatedItemCount(aggregatedItemCount),
|
m_aggregatedItemCount(aggregatedItemCount),
|
||||||
m_reportStepCount(1)
|
m_reportStepCount(1)
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
class RifKeywordLocation
|
class RifKeywordLocation
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RifKeywordLocation(std::string keyword, size_t itemCount, int indexWithinReportStep)
|
RifKeywordLocation(const std::string& keyword, size_t itemCount, int indexWithinReportStep)
|
||||||
: m_keyword(keyword),
|
: m_keyword(keyword),
|
||||||
m_itemCount(itemCount),
|
m_itemCount(itemCount),
|
||||||
m_indexWithinReportStep(indexWithinReportStep)
|
m_indexWithinReportStep(indexWithinReportStep)
|
||||||
|
@ -367,7 +367,7 @@ std::map<std::string, std::vector<std::string> > RigFemPartResultsCollection::sc
|
|||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string fieldNameToConvert)
|
RigFemScalarResultFrames* RigFemPartResultsCollection::calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string& fieldNameToConvert)
|
||||||
{
|
{
|
||||||
caf::ProgressInfo frameCountProgress(this->frameCount() * 2, "");
|
caf::ProgressInfo frameCountProgress(this->frameCount() * 2, "");
|
||||||
frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(convertedResultAddr.fieldName + ": " + convertedResultAddr.componentName));
|
frameCountProgress.setProgressDescription("Calculating " + QString::fromStdString(convertedResultAddr.fieldName + ": " + convertedResultAddr.componentName));
|
||||||
|
@ -86,7 +86,7 @@ private:
|
|||||||
RigFemScalarResultFrames * dstDataFrames,
|
RigFemScalarResultFrames * dstDataFrames,
|
||||||
caf::ProgressInfo* frameCountProgress);
|
caf::ProgressInfo* frameCountProgress);
|
||||||
|
|
||||||
RigFemScalarResultFrames* calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string fieldNameToConvert);
|
RigFemScalarResultFrames* calculateBarConvertedResult(int partIndex, const RigFemResultAddress &convertedResultAddr, const std::string& fieldNameToConvert);
|
||||||
RigFemScalarResultFrames* calculateEnIpPorBarResult(int partIndex, const RigFemResultAddress &convertedResultAddr);
|
RigFemScalarResultFrames* calculateEnIpPorBarResult(int partIndex, const RigFemResultAddress &convertedResultAddr);
|
||||||
RigFemScalarResultFrames* calculateTimeLapseResult(int partIndex, const RigFemResultAddress& resVarAddr);
|
RigFemScalarResultFrames* calculateTimeLapseResult(int partIndex, const RigFemResultAddress& resVarAddr);
|
||||||
RigFemScalarResultFrames* calculateMeanStressSEM(int partIndex, const RigFemResultAddress& resVarAddr);
|
RigFemScalarResultFrames* calculateMeanStressSEM(int partIndex, const RigFemResultAddress& resVarAddr);
|
||||||
|
@ -38,8 +38,9 @@
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigGeoMechCaseData::RigGeoMechCaseData(const std::string& fileName)
|
RigGeoMechCaseData::RigGeoMechCaseData(const std::string& fileName)
|
||||||
|
: m_geoMechCaseFileName(fileName)
|
||||||
{
|
{
|
||||||
m_geoMechCaseFileName = fileName;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
|
@ -696,7 +696,7 @@ std::map<std::string, std::vector<std::string> > RifOdbReader::fieldAndComponent
|
|||||||
std::map<std::string, std::vector<std::string> > fieldsAndComponents;
|
std::map<std::string, std::vector<std::string> > fieldsAndComponents;
|
||||||
|
|
||||||
std::map< RifOdbResultKey, std::vector<std::string> >::const_iterator resMapIt;
|
std::map< RifOdbResultKey, std::vector<std::string> >::const_iterator resMapIt;
|
||||||
for (resMapIt = m_resultsMetaData.begin(); resMapIt != m_resultsMetaData.end(); resMapIt++)
|
for (resMapIt = m_resultsMetaData.begin(); resMapIt != m_resultsMetaData.end(); ++resMapIt)
|
||||||
{
|
{
|
||||||
if (resMapIt->first.resultPostion == position)
|
if (resMapIt->first.resultPostion == position)
|
||||||
{
|
{
|
||||||
|
@ -52,7 +52,7 @@ size_t RigEclCellIndexCalculator::resultCellIndex(size_t gridIndex, size_t gridC
|
|||||||
RigAccWellFlowCalculator::RigAccWellFlowCalculator(const std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
|
RigAccWellFlowCalculator::RigAccWellFlowCalculator(const std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
|
||||||
const std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds,
|
const std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds,
|
||||||
const std::map<QString, const std::vector<double>* >& tracerCellFractionValues,
|
const std::map<QString, const std::vector<double>* >& tracerCellFractionValues,
|
||||||
const RigEclCellIndexCalculator cellIndexCalculator,
|
const RigEclCellIndexCalculator& cellIndexCalculator,
|
||||||
double smallContribThreshold,
|
double smallContribThreshold,
|
||||||
bool isProducer)
|
bool isProducer)
|
||||||
: m_pipeBranchesCLCoords(pipeBranchesCLCoords),
|
: m_pipeBranchesCLCoords(pipeBranchesCLCoords),
|
||||||
|
@ -59,7 +59,7 @@ public:
|
|||||||
RigAccWellFlowCalculator(const std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
|
RigAccWellFlowCalculator(const std::vector< std::vector <cvf::Vec3d> >& pipeBranchesCLCoords,
|
||||||
const std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds,
|
const std::vector< std::vector <RigWellResultPoint> >& pipeBranchesCellIds,
|
||||||
const std::map<QString, const std::vector<double>* >& tracerCellFractionValues,
|
const std::map<QString, const std::vector<double>* >& tracerCellFractionValues,
|
||||||
const RigEclCellIndexCalculator cellIndexCalculator,
|
const RigEclCellIndexCalculator& cellIndexCalculator,
|
||||||
double smallContribThreshold,
|
double smallContribThreshold,
|
||||||
bool isProducer);
|
bool isProducer);
|
||||||
|
|
||||||
|
@ -24,9 +24,8 @@
|
|||||||
///
|
///
|
||||||
//--------------------------------------------------------------------------------------------------
|
//--------------------------------------------------------------------------------------------------
|
||||||
RigSimulationWellCoordsAndMD::RigSimulationWellCoordsAndMD(const std::vector<cvf::Vec3d>& wellPathPoints)
|
RigSimulationWellCoordsAndMD::RigSimulationWellCoordsAndMD(const std::vector<cvf::Vec3d>& wellPathPoints)
|
||||||
|
: m_wellPathPoints(wellPathPoints)
|
||||||
{
|
{
|
||||||
m_wellPathPoints = wellPathPoints;
|
|
||||||
|
|
||||||
computeMeasuredDepths();
|
computeMeasuredDepths();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user