Commit a483815f authored by Martin Nolte's avatar Martin Nolte

Merge branch 'cherry-pick-1d10aaea' into 'releases/2.6'

Merge branch 'bugfix/init-default-constructed-ygrid-iterator' into 'master'

See merge request !249
parents e557b301 69042a49
Pipeline #5882 passed with stage
in 52 minutes and 34 seconds
......@@ -296,7 +296,7 @@ namespace Dune {
class Iterator {
public:
// default constructor
Iterator () {}
Iterator () = default;
//! Make iterator pointing to first cell in a grid.
Iterator (const YGridComponent<Coordinates>& r) : _grid(&r)
......@@ -461,9 +461,9 @@ namespace Dune {
}
protected:
iTupel _coord; //!< current position in index set
int _superindex; //!< consecutive index in enclosing grid
const YGridComponent<Coordinates>* _grid;
iTupel _coord; //!< current position in index set
int _superindex = 0; //!< consecutive index in enclosing grid
const YGridComponent<Coordinates>* _grid = nullptr;
};
......@@ -593,8 +593,7 @@ namespace Dune {
public:
//! default constructor
Iterator ()
{}
Iterator () = default;
//! construct an iterator from coordinates and component
Iterator (const YGrid<Coordinates>& yg, const std::array<int,dim>& coords, int which = 0)
......@@ -737,8 +736,8 @@ namespace Dune {
private:
unsigned int _which;
const YGrid<Coordinates>* _yg;
unsigned int _which = 0;
const YGrid<Coordinates>* _yg = nullptr;
typename YGridComponent<Coordinates>::Iterator _it;
};
......
Markdown is supported
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