#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
{
public:
RivFemIntersectionGrid(const RigFemPart * femPart);
explicit RivFemIntersectionGrid(const RigFemPart * femPart);
virtual cvf::Vec3d displayOffset() const;
virtual cvf::BoundingBox boundingBox() const;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -38,7 +38,7 @@ class Font;
class RivTernarySaturationOverlayItem : public cvf::OverlayItem
{
public:
RivTernarySaturationOverlayItem(cvf::Font* font);
explicit RivTernarySaturationOverlayItem(cvf::Font* font);
~RivTernarySaturationOverlayItem();
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
{
public:
RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor);
explicit RivTernaryScalarMapper(const cvf::Color3f& undefScalarColor);
void setTernaryRanges(double soilLower, double soilUpper, double sgasLower, double sgasUpper);

View File

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

View File

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

View File

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