mirror of
https://git.rwth-aachen.de/acs/public/villas/node/
synced 2025-03-09 00:00:00 +01:00
initialize variables in constructors
Signed-off-by: Steffen Vogel <post@steffenvogel.de>
This commit is contained in:
parent
d5ff9a1b53
commit
a91158eb6c
1 changed files with 6 additions and 2 deletions
|
@ -18,13 +18,17 @@ class Vertex {
|
|||
public:
|
||||
using Identifier = std::size_t;
|
||||
|
||||
Vertex() :
|
||||
id(0)
|
||||
{ }
|
||||
|
||||
const Identifier& getIdentifier() const
|
||||
{
|
||||
return id;
|
||||
}
|
||||
|
||||
friend
|
||||
std::ostream& operator<< (std::ostream &stream, const Vertex &vertex)
|
||||
std::ostream& operator<<(std::ostream &stream, const Vertex &vertex)
|
||||
{
|
||||
return stream << vertex.id;
|
||||
}
|
||||
|
@ -35,7 +39,7 @@ public:
|
|||
}
|
||||
|
||||
private:
|
||||
Identifier id = 0;
|
||||
Identifier id;
|
||||
// HACK: how to resolve this circular type dependency?
|
||||
std::list<std::size_t> edges;
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue