Skip to content
Snippets Groups Projects
Commit 7a61a9c5 authored by Dmitri Naumov's avatar Dmitri Naumov
Browse files

[GL] Add assertions in GeoLib::Triangle ctor.

parent 4f09e2a8
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ namespace GeoLib { ...@@ -24,6 +24,7 @@ namespace GeoLib {
Triangle::Triangle (std::vector<Point *> const &pnt_vec) : Triangle::Triangle (std::vector<Point *> const &pnt_vec) :
_pnts(pnt_vec), _initialized (false), _longest_edge (0.0) _pnts(pnt_vec), _initialized (false), _longest_edge (0.0)
{ {
assert(!_pnts.empty());
_pnt_ids[0] = std::numeric_limits<std::size_t>::max(); _pnt_ids[0] = std::numeric_limits<std::size_t>::max();
_pnt_ids[1] = std::numeric_limits<std::size_t>::max(); _pnt_ids[1] = std::numeric_limits<std::size_t>::max();
_pnt_ids[2] = std::numeric_limits<std::size_t>::max(); _pnt_ids[2] = std::numeric_limits<std::size_t>::max();
...@@ -33,6 +34,7 @@ Triangle::Triangle (std::vector<Point *> const &pnt_vec, ...@@ -33,6 +34,7 @@ Triangle::Triangle (std::vector<Point *> const &pnt_vec,
std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c) : std::size_t pnt_a, std::size_t pnt_b, std::size_t pnt_c) :
_pnts(pnt_vec), _initialized (true), _longest_edge (0.0) _pnts(pnt_vec), _initialized (true), _longest_edge (0.0)
{ {
assert(!_pnts.empty());
_pnt_ids[0] = pnt_a; _pnt_ids[0] = pnt_a;
_pnt_ids[1] = pnt_b; _pnt_ids[1] = pnt_b;
_pnt_ids[2] = pnt_c; _pnt_ids[2] = pnt_c;
......
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