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

[GL] Move default initialization of Grid members.

The original initialization of the std::array's was by copy anyway
and somehow caused in seg faults on mac after adding c++17 standard.
parent 8a79fd93
No related branches found
No related tags found
No related merge requests found
......@@ -177,22 +177,19 @@ private:
static POINT const* copyOrAddress(POINT const& p) { return &p; }
static POINT* copyOrAddress(POINT* p) { return p; }
std::array<std::size_t,3> _n_steps;
std::array<double, 3> _step_sizes;
std::array<std::size_t,3> _n_steps = {{1, 1, 1}};
std::array<double, 3> _step_sizes = {{0.0, 0.0, 0.0}};
/**
* This is an array that stores pointers to POINT objects.
*/
std::vector<POINT*>* _grid_cell_nodes_map;
std::vector<POINT*>* _grid_cell_nodes_map = nullptr;
};
template <typename POINT>
template <typename InputIterator>
Grid<POINT>::Grid(InputIterator first, InputIterator last,
std::size_t max_num_per_grid_cell)
: GeoLib::AABB(first, last),
_n_steps({{1, 1, 1}}),
_step_sizes({{0.0, 0.0, 0.0}}),
_grid_cell_nodes_map(nullptr)
: GeoLib::AABB(first, last)
{
auto const n_pnts(std::distance(first,last));
......
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