mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
CppCheck : Use std::array
This commit is contained in:
parent
840f011346
commit
76913aded5
@ -23,9 +23,11 @@
|
||||
#include "cvfVector3.h"
|
||||
#include "cvfBoundingBox.h"
|
||||
|
||||
#include <vector>
|
||||
#include "cvfStructGrid.h"
|
||||
|
||||
#include <vector>
|
||||
#include <array>
|
||||
|
||||
class RigActiveCellInfo;
|
||||
class RigFemPart;
|
||||
class RigMainGrid;
|
||||
@ -55,12 +57,12 @@ class RivEclipseIntersectionGrid : public RivIntersectionHexGridInterface
|
||||
public:
|
||||
RivEclipseIntersectionGrid(const RigMainGrid * mainGrid, const RigActiveCellInfo* activeCellInfo, bool showInactiveCells);
|
||||
|
||||
virtual cvf::Vec3d displayOffset() const;
|
||||
virtual cvf::BoundingBox boundingBox() const;
|
||||
virtual void findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const;
|
||||
virtual bool useCell(size_t cellIndex) const;
|
||||
virtual void cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const;
|
||||
virtual void cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const;
|
||||
cvf::Vec3d displayOffset() const override;
|
||||
cvf::BoundingBox boundingBox() const override;
|
||||
void findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const override;
|
||||
bool useCell(size_t cellIndex) const override;
|
||||
void cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const override;
|
||||
void cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const override;
|
||||
virtual const RigFault* findFaultFromCellIndexAndCellFace(size_t reservoirCellIndex,
|
||||
cvf::StructGridInterface::FaceType face) const override;
|
||||
|
||||
@ -78,12 +80,12 @@ class RivFemIntersectionGrid : public RivIntersectionHexGridInterface
|
||||
public:
|
||||
explicit RivFemIntersectionGrid(const RigFemPart * femPart);
|
||||
|
||||
virtual cvf::Vec3d displayOffset() const;
|
||||
virtual cvf::BoundingBox boundingBox() const;
|
||||
virtual void findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const;
|
||||
virtual bool useCell(size_t cellIndex) const;
|
||||
virtual void cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const;
|
||||
virtual void cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const;
|
||||
cvf::Vec3d displayOffset() const override;
|
||||
cvf::BoundingBox boundingBox() const override;
|
||||
void findIntersectingCells(const cvf::BoundingBox& intersectingBB, std::vector<size_t>* intersectedCells) const override;
|
||||
bool useCell(size_t cellIndex) const override;
|
||||
void cellCornerVertices(size_t cellIndex, cvf::Vec3d cellCorners[8]) const override;
|
||||
void cellCornerIndices(size_t cellIndex, size_t cornerIndices[8]) const override;
|
||||
virtual const RigFault* findFaultFromCellIndexAndCellFace(size_t reservoirCellIndex,
|
||||
cvf::StructGridInterface::FaceType face) const override;
|
||||
|
||||
@ -187,8 +189,7 @@ Substitution and reorganizing gives the expressions seen below.
|
||||
float weight(int idx)const { return m_weights[idx]; }
|
||||
|
||||
private:
|
||||
|
||||
size_t m_vxIds[8];
|
||||
float m_weights[8];
|
||||
std::array<size_t, 8> m_vxIds;
|
||||
std::array<float, 8> m_weights;
|
||||
int m_count;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user