# HG changeset patch # User deba # Date 1130945317 0 # Node ID bf267b301a5e1b26e290dc8f5995d95d85a6e292 # Parent 4bf5ceb49023d25aa67c5473062030c6805c6d44 Make constructor explicit Indentation changed diff -r 4bf5ceb49023 -r bf267b301a5e lemon/bfs.h --- a/lemon/bfs.h Wed Nov 02 15:27:38 2005 +0000 +++ b/lemon/bfs.h Wed Nov 02 15:28:37 2005 +0000 @@ -550,10 +550,10 @@ ///\param nm must be a bool (or convertible) node map. The algorithm ///will stop when it reaches a node \c v with nm[v]==true. template - void start(const NM &nm) - { - while ( !emptyQueue() && !nm[_queue[_queue_tail]] ) processNextNode(); - } + void start(const NM &nm) + { + while ( !emptyQueue() && !nm[_queue[_queue_tail]] ) processNextNode(); + } ///Runs %BFS algorithm from node \c s. diff -r 4bf5ceb49023 -r bf267b301a5e lemon/graph_adaptor.h --- a/lemon/graph_adaptor.h Wed Nov 02 15:27:38 2005 +0000 +++ b/lemon/graph_adaptor.h Wed Nov 02 15:28:37 2005 +0000 @@ -127,18 +127,20 @@ class NodeMap : public _Graph::template NodeMap<_Value> { public: typedef typename _Graph::template NodeMap<_Value> Parent; - NodeMap(const GraphAdaptorBase<_Graph>& gw) : Parent(*gw.graph) { } + explicit NodeMap(const GraphAdaptorBase<_Graph>& gw) + : Parent(*gw.graph) { } NodeMap(const GraphAdaptorBase<_Graph>& gw, const _Value& value) - : Parent(*gw.graph, value) { } + : Parent(*gw.graph, value) { } }; template class EdgeMap : public _Graph::template EdgeMap<_Value> { public: typedef typename _Graph::template EdgeMap<_Value> Parent; - EdgeMap(const GraphAdaptorBase<_Graph>& gw) : Parent(*gw.graph) { } + explicit EdgeMap(const GraphAdaptorBase<_Graph>& gw) + : Parent(*gw.graph) { } EdgeMap(const GraphAdaptorBase<_Graph>& gw, const _Value& value) - : Parent(*gw.graph, value) { } + : Parent(*gw.graph, value) { } }; }; @@ -153,7 +155,7 @@ GraphAdaptor() : Parent() { } public: - GraphAdaptor(Graph& _graph) { setGraph(_graph); } + explicit GraphAdaptor(Graph& _graph) { setGraph(_graph); } }; template @@ -211,7 +213,7 @@ protected: RevGraphAdaptor() { } public: - RevGraphAdaptor(_Graph& _graph) { setGraph(_graph); } + explicit RevGraphAdaptor(_Graph& _graph) { setGraph(_graph); } };