Skip to content
Snippets Groups Projects
Commit 698c9f04 authored by Tom Fischer's avatar Tom Fischer
Browse files

[GL] Use std::array instead of C array.

parent 21e4a27f
No related branches found
No related tags found
No related merge requests found
......@@ -23,12 +23,9 @@ namespace GeoLib {
Triangle::Triangle (std::vector<Point *> const &pnt_vec,
std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c) :
_pnts(pnt_vec), _initialized (true)
_pnts(pnt_vec), _pnt_ids( {{pnt_a, pnt_b, pnt_c}} )
{
assert(!_pnts.empty());
_pnt_ids[0] = pnt_a;
_pnt_ids[1] = pnt_b;
_pnt_ids[2] = pnt_c;
}
void Triangle::setTriangle (std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c)
......
......@@ -78,7 +78,7 @@ protected:
/** a vector of pointers to points */
const std::vector<Point*> &_pnts;
/** position of pointers to the geometric points */
std::size_t _pnt_ids[3];
std::array<std::size_t, 3> _pnt_ids;
};
void getPlaneCoefficients(Triangle const& tri, double c[3]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment