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

[MeL] MeshSubsets ctor aborts on non-unique meshid

parent 1ed86f65
No related branches found
No related tags found
No related merge requests found
...@@ -14,10 +14,13 @@ ...@@ -14,10 +14,13 @@
#define MESHSUBSETS_H_ #define MESHSUBSETS_H_
#include <algorithm> #include <algorithm>
#include <cstdlib>
#include <functional> #include <functional>
#include <numeric> #include <numeric>
#include <vector> #include <vector>
#include <logog/include/logog.hpp>
#include "MeshSubset.h" #include "MeshSubset.h"
namespace MeshLib namespace MeshLib
...@@ -44,8 +47,10 @@ public: ...@@ -44,8 +47,10 @@ public:
: _mesh_subsets(first, last) : _mesh_subsets(first, last)
{ {
if (!areMeshSubsetMeshesUnique()) if (!areMeshSubsetMeshesUnique())
{
ERR("Mesh ids of input mesh subsets are not unique."); ERR("Mesh ids of input mesh subsets are not unique.");
assert(areMeshSubsetMeshesUnique()); std::abort();
}
_n_total_items = std::accumulate(first, last, 0u, _n_total_items = std::accumulate(first, last, 0u,
[](std::size_t const& sum, MeshSubset const* const mesh_subset) [](std::size_t const& sum, MeshSubset const* const mesh_subset)
......
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