diff options
Diffstat (limited to 'Source/cmGraphAdjacencyList.h')
-rw-r--r-- | Source/cmGraphAdjacencyList.h | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/Source/cmGraphAdjacencyList.h b/Source/cmGraphAdjacencyList.h index 0149d33..5666d48 100644 --- a/Source/cmGraphAdjacencyList.h +++ b/Source/cmGraphAdjacencyList.h @@ -22,10 +22,26 @@ class cmGraphEdge { public: - cmGraphEdge(): Dest(0), Strong(true) {} - cmGraphEdge(int n): Dest(n), Strong(true) {} - cmGraphEdge(int n, bool s): Dest(n), Strong(s) {} - cmGraphEdge(cmGraphEdge const& r): Dest(r.Dest), Strong(r.Strong) {} + cmGraphEdge() + : Dest(0) + , Strong(true) + { + } + cmGraphEdge(int n) + : Dest(n) + , Strong(true) + { + } + cmGraphEdge(int n, bool s) + : Dest(n) + , Strong(s) + { + } + cmGraphEdge(cmGraphEdge const& r) + : Dest(r.Dest) + , Strong(r.Strong) + { + } operator int() const { return this->Dest; } bool IsStrong() const { return this->Strong; } @@ -33,8 +49,14 @@ private: int Dest; bool Strong; }; -struct cmGraphEdgeList: public std::vector<cmGraphEdge> {}; -struct cmGraphNodeList: public std::vector<int> {}; -struct cmGraphAdjacencyList: public std::vector<cmGraphEdgeList> {}; +struct cmGraphEdgeList : public std::vector<cmGraphEdge> +{ +}; +struct cmGraphNodeList : public std::vector<int> +{ +}; +struct cmGraphAdjacencyList : public std::vector<cmGraphEdgeList> +{ +}; #endif |