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

[GL] Fix cppcoreguidelines-pro-type-member-init.

parent d0b901f2
No related branches found
No related tags found
No related merge requests found
......@@ -377,7 +377,7 @@ template <typename POINT>
template <typename T>
std::array<std::size_t,3> Grid<POINT>::getGridCoords(T const& pnt) const
{
std::array<std::size_t,3> coords;
std::array<std::size_t,3> coords{};
for (std::size_t k(0); k < 3; k++)
{
if (pnt[k] < _min_pnt[k])
......@@ -407,7 +407,7 @@ template <typename P>
std::array<double,6> Grid<POINT>::getPointCellBorderDistances(P const& p,
std::array<std::size_t,3> const& coords) const
{
std::array<double,6> dists;
std::array<double,6> dists{};
dists[0] = std::abs(p[2]-_min_pnt[2] + coords[2]*_step_sizes[2]); // bottom
dists[5] = std::abs(p[2]-_min_pnt[2] + (coords[2]+1)*_step_sizes[2]); // top
......
......@@ -99,7 +99,7 @@ double Raster::interpolateValueAtPoint(MathLib::Point3d const& pnt) const
std::array<int,4> const y_nb = {{ 0, 0, yShiftIdx, yShiftIdx }};
// get pixel values
std::array<double,4> pix_val;
std::array<double,4> pix_val{};
unsigned no_data_count (0);
for (unsigned j=0; j<4; ++j)
{
......
......@@ -38,8 +38,8 @@ private:
bool sortTriangleInGridCells(GeoLib::Triangle const*const triangle);
boost::optional<std::array<std::size_t,3>>
getGridCellCoordinates(MathLib::Point3d const& p) const;
std::array<double,3> _step_sizes;
std::array<double,3> _inverse_step_sizes;
std::array<double,3> _step_sizes{};
std::array<double,3> _inverse_step_sizes{};
std::array<std::size_t,3> _n_steps;
std::vector<std::vector<GeoLib::Triangle const*>> _triangles_in_grid_box;
};
......
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