#1292 Fixed CppCheck Issues in ModelVisualization

This commit is contained in:
Jacob Støren 2017-03-06 11:18:34 +01:00
parent c7c01e346c
commit b5e782dfc3
19 changed files with 17 additions and 22 deletions

View File

@ -71,7 +71,7 @@ private:
class RivFemIntersectionGrid : public RivIntersectionHexGridInterface class RivFemIntersectionGrid : public RivIntersectionHexGridInterface
{ {
public: public:
RivFemIntersectionGrid(const RigFemPart * femPart); explicit RivFemIntersectionGrid(const RigFemPart * femPart);
virtual cvf::Vec3d displayOffset() const; virtual cvf::Vec3d displayOffset() const;
virtual cvf::BoundingBox boundingBox() const; virtual cvf::BoundingBox boundingBox() const;

View File

@ -349,8 +349,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionBoxPartMgr::createHexGr
m_rimIntersectionBox->firstAncestorOrThisOfType(eclipseView); m_rimIntersectionBox->firstAncestorOrThisOfType(eclipseView);
if (eclipseView) if (eclipseView)
{ {
RigMainGrid* grid = NULL; RigMainGrid* grid = eclipseView->mainGrid();
grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells()); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimIntersectionBox->showInactiveCells());
} }

View File

@ -45,7 +45,7 @@ class RimIntersectionBox;
class RivIntersectionBoxPartMgr : public cvf::Object class RivIntersectionBoxPartMgr : public cvf::Object
{ {
public: public:
RivIntersectionBoxPartMgr(const RimIntersectionBox* intersectionBox); explicit RivIntersectionBoxPartMgr(const RimIntersectionBox* intersectionBox);
void applySingleColorEffect(); void applySingleColorEffect();
void updateCellResultColor(size_t timeStepIndex); void updateCellResultColor(size_t timeStepIndex);

View File

@ -29,7 +29,7 @@ class RimIntersectionBox;
class RivIntersectionBoxSourceInfo : public cvf::Object class RivIntersectionBoxSourceInfo : public cvf::Object
{ {
public: public:
RivIntersectionBoxSourceInfo(RivIntersectionBoxGeometryGenerator* geometryGenerator); explicit RivIntersectionBoxSourceInfo(RivIntersectionBoxGeometryGenerator* geometryGenerator);
const std::vector<size_t>& triangleToCellIndex() const; const std::vector<size_t>& triangleToCellIndex() const;

View File

@ -737,8 +737,7 @@ cvf::ref<RivIntersectionHexGridInterface> RivIntersectionPartMgr::createHexGridI
m_rimCrossSection->firstAncestorOrThisOfType(eclipseView); m_rimCrossSection->firstAncestorOrThisOfType(eclipseView);
if (eclipseView) if (eclipseView)
{ {
RigMainGrid* grid = NULL; RigMainGrid* grid = eclipseView->mainGrid();
grid = eclipseView->mainGrid();
return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells()); return new RivEclipseIntersectionGrid(grid, eclipseView->currentActiveCellInfo(), m_rimCrossSection->showInactiveCells());
} }

View File

@ -55,7 +55,7 @@ class RivIntersectionVertexWeights;
class RivIntersectionPartMgr : public cvf::Object class RivIntersectionPartMgr : public cvf::Object
{ {
public: public:
RivIntersectionPartMgr(const RimIntersection* rimCrossSection); explicit RivIntersectionPartMgr(const RimIntersection* rimCrossSection);
void applySingleColorEffect(); void applySingleColorEffect();
void updateCellResultColor(size_t timeStepIndex); void updateCellResultColor(size_t timeStepIndex);

View File

@ -30,7 +30,7 @@ class RimIntersection;
class RivIntersectionSourceInfo : public cvf::Object class RivIntersectionSourceInfo : public cvf::Object
{ {
public: public:
RivIntersectionSourceInfo(RivIntersectionGeometryGenerator* geometryGenerator); explicit RivIntersectionSourceInfo(RivIntersectionGeometryGenerator* geometryGenerator);
const std::vector<size_t>& triangleToCellIndex() const; const std::vector<size_t>& triangleToCellIndex() const;
std::array<cvf::Vec3f, 3> triangle(int triangleIdx) const; std::array<cvf::Vec3f, 3> triangle(int triangleIdx) const;

View File

@ -101,7 +101,7 @@ class RivTernaryScalarMapper;
class CellEdgeEffectGenerator : public caf::EffectGenerator class CellEdgeEffectGenerator : public caf::EffectGenerator
{ {
public: public:
CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper); explicit CellEdgeEffectGenerator(const cvf::ScalarMapper* edgeScalarMapper);
void setScalarMapper(const cvf::ScalarMapper* cellScalarMapper); void setScalarMapper(const cvf::ScalarMapper* cellScalarMapper);
void setTernaryScalarMapper(const RivTernaryScalarMapper* ternaryScalarMapper); void setTernaryScalarMapper(const RivTernaryScalarMapper* ternaryScalarMapper);

View File

@ -471,7 +471,6 @@ void RivPipeGeometryGenerator::updateFilteredPipeCenterCoords()
double squareDistanceTolerance = 1e-4*1e-4; double squareDistanceTolerance = 1e-4*1e-4;
const size_t lastOriginalCoordIdx = m_originalPipeCenterCoords->size() - 1; const size_t lastOriginalCoordIdx = m_originalPipeCenterCoords->size() - 1;
const size_t originalSegmentCount = m_originalPipeCenterCoords->size() - 1;
size_t firstSegmentWithLength = findFirstSegmentWithLenght(squareDistanceTolerance); size_t firstSegmentWithLength = findFirstSegmentWithLenght(squareDistanceTolerance);

View File

@ -38,7 +38,7 @@ class RivWellHeadPartMgr;
class RivReservoirPipesPartMgr : public cvf::Object class RivReservoirPipesPartMgr : public cvf::Object
{ {
public: public:
RivReservoirPipesPartMgr(RimEclipseView* reservoirView); explicit RivReservoirPipesPartMgr(RimEclipseView* reservoirView);
~RivReservoirPipesPartMgr(); ~RivReservoirPipesPartMgr();
void clearGeometryCache(); void clearGeometryCache();

View File

@ -46,7 +46,7 @@ namespace cvf
class RivReservoirViewPartMgr: public cvf::Object class RivReservoirViewPartMgr: public cvf::Object
{ {
public: public:
RivReservoirViewPartMgr(RimEclipseView * resv); explicit RivReservoirViewPartMgr(RimEclipseView * resv);
cvf::Transform* scaleTransform() { return m_scaleTransform.p();} cvf::Transform* scaleTransform() { return m_scaleTransform.p();}

View File

@ -35,7 +35,7 @@ class RivWellSpheresPartMgr;
class RivReservoirWellSpheresPartMgr : public cvf::Object class RivReservoirWellSpheresPartMgr : public cvf::Object
{ {
public: public:
RivReservoirWellSpheresPartMgr(RimEclipseView* reservoirView); explicit RivReservoirWellSpheresPartMgr(RimEclipseView* reservoirView);
~RivReservoirWellSpheresPartMgr(); ~RivReservoirWellSpheresPartMgr();
void clearGeometryCache(); void clearGeometryCache();

View File

@ -188,8 +188,6 @@ void RivSimWellPipesPartMgr::appendDynamicGeometryPartsToModel(cvf::ModelBasicLi
if (m_needsTransformUpdate) buildWellPipeParts(); if (m_needsTransformUpdate) buildWellPipeParts();
const RigWellResultFrame& wellResultFrame = m_rimWell->wellResults()->wellResultFrame(frameIndex);
std::list<RivPipeBranchData>::iterator it; std::list<RivPipeBranchData>::iterator it;
for (it = m_wellBranches.begin(); it != m_wellBranches.end(); ++it) for (it = m_wellBranches.begin(); it != m_wellBranches.end(); ++it)
{ {

View File

@ -27,7 +27,7 @@
class RivSourceInfo : public cvf::Object class RivSourceInfo : public cvf::Object
{ {
public: public:
RivSourceInfo(size_t gridIndex) : m_gridIndex(gridIndex) {} explicit RivSourceInfo(size_t gridIndex) : m_gridIndex(gridIndex) {}
size_t gridIndex() const { return m_gridIndex; } size_t gridIndex() const { return m_gridIndex; }
bool hasCellFaceMapping() const; bool hasCellFaceMapping() const;

View File

@ -38,7 +38,7 @@ class Font;
class RivTernarySaturationOverlayItem : public cvf::OverlayItem class RivTernarySaturationOverlayItem : public cvf::OverlayItem
{ {
public: public:
RivTernarySaturationOverlayItem(cvf::Font* font); explicit RivTernarySaturationOverlayItem(cvf::Font* font);
~RivTernarySaturationOverlayItem(); ~RivTernarySaturationOverlayItem();
void setRangeText(const cvf::String& soilRange, const cvf::String& sgasRange, const cvf::String& swatRange); void setRangeText(const cvf::String& soilRange, const cvf::String& sgasRange, const cvf::String& swatRange);

View File

@ -35,7 +35,7 @@ namespace cvf
class RivTernaryScalarMapper : public cvf::Object class RivTernaryScalarMapper : public cvf::Object
{ {
public: public:
RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor); explicit RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor);
void setTernaryRanges(double soilLower, double soilUpper, double sgasLower, double sgasUpper); void setTernaryRanges(double soilLower, double soilUpper, double sgasLower, double sgasUpper);

View File

@ -42,7 +42,7 @@ namespace cvf
class RivWellPathCollectionPartMgr : public cvf::Object class RivWellPathCollectionPartMgr : public cvf::Object
{ {
public: public:
RivWellPathCollectionPartMgr(RimWellPathCollection* wellPathCollection); explicit RivWellPathCollectionPartMgr(RimWellPathCollection* wellPathCollection);
~RivWellPathCollectionPartMgr(); ~RivWellPathCollectionPartMgr();
void scheduleGeometryRegen(); void scheduleGeometryRegen();

View File

@ -40,7 +40,7 @@ class RimWellPath;
class RivWellPathPartMgr : public cvf::Object class RivWellPathPartMgr : public cvf::Object
{ {
public: public:
RivWellPathPartMgr(RimWellPath* wellPath); explicit RivWellPathPartMgr(RimWellPath* wellPath);
~RivWellPathPartMgr(); ~RivWellPathPartMgr();
void setScaleTransform(cvf::Transform * scaleTransform); void setScaleTransform(cvf::Transform * scaleTransform);

View File

@ -33,7 +33,7 @@ class RimWellPath;
class RivWellPathSourceInfo : public cvf::Object class RivWellPathSourceInfo : public cvf::Object
{ {
public: public:
RivWellPathSourceInfo(RimWellPath* wellPath); explicit RivWellPathSourceInfo(RimWellPath* wellPath);
RimWellPath* wellPath() const; RimWellPath* wellPath() const;