WSL/SLF GitLab Repository

Commit a3a3cf5d authored by Mathias Bavay's avatar Mathias Bavay
Browse files

This was quite a nasty bug: in some cases, a point that could not be gridified...

This was quite a nasty bug: in some cases, a point that could not be gridified would be re-tried, resulting in a valid point although the vector as a whole signaled that it had invalid entries. Way too many hours for that...
parent 04b213bf
......@@ -186,11 +186,11 @@ Grid2DObject::Grid2DObject(const Grid2DObject& i_grid2Dobj, const size_t& i_nx,
bool Grid2DObject::gridify(std::vector<Coords>& vec_points, const bool& keep_invalid) const
{
bool status=true;
std::vector<Coords>::iterator v_Itr = vec_points.begin();
while ( v_Itr != vec_points.end() ) {
if ( gridify(*v_Itr)==false ) {
if (!keep_invalid) v_Itr = vec_points.erase(v_Itr);
else ++v_Itr;
status=false;
} else {
++v_Itr;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment