COIN-OR::LEMON - Graph Library

Changeset 2386:81b47fc5c444 in lemon-0.x for lemon/bits/graph_extender.h


Ignore:
Timestamp:
03/02/07 19:04:28 (12 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@3217
Message:

Hard Warning checking

  • based on the remark of the ZIB user
  • we do not use -Winline
File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/bits/graph_extender.h

    r2384 r2386  
    557557    /// Returns the base node (ie. the source in this case) of the iterator
    558558    Node baseNode(const OutEdgeIt &e) const {
    559       return Parent::source((Edge)e);
     559      return Parent::source(static_cast<const Edge&>(e));
    560560    }
    561561    /// \brief Running node of the iterator
     
    564564    /// iterator
    565565    Node runningNode(const OutEdgeIt &e) const {
    566       return Parent::target((Edge)e);
     566      return Parent::target(static_cast<const Edge&>(e));
    567567    }
    568568
     
    571571    /// Returns the base node (ie. the target in this case) of the iterator
    572572    Node baseNode(const InEdgeIt &e) const {
    573       return Parent::target((Edge)e);
     573      return Parent::target(static_cast<const Edge&>(e));
    574574    }
    575575    /// \brief Running node of the iterator
     
    578578    /// iterator
    579579    Node runningNode(const InEdgeIt &e) const {
    580       return Parent::source((Edge)e);
     580      return Parent::source(static_cast<const Edge&>(e));
    581581    }
    582582
     
    680680      UEdge uedge = Parent::addEdge(from, to);
    681681      notifier(UEdge()).add(uedge);
    682       std::vector<Edge> edges;
    683       edges.push_back(Parent::direct(uedge, true));
    684       edges.push_back(Parent::direct(uedge, false));     
    685       notifier(Edge()).add(edges);
     682      std::vector<Edge> ev;
     683      ev.push_back(Parent::direct(uedge, true));
     684      ev.push_back(Parent::direct(uedge, false));     
     685      notifier(Edge()).add(ev);
    686686      return uedge;
    687687    }
     
    722722
    723723    void erase(const UEdge& uedge) {
    724       std::vector<Edge> edges;
    725       edges.push_back(Parent::direct(uedge, true));
    726       edges.push_back(Parent::direct(uedge, false));     
    727       notifier(Edge()).erase(edges);
     724      std::vector<Edge> ev;
     725      ev.push_back(Parent::direct(uedge, true));
     726      ev.push_back(Parent::direct(uedge, false));     
     727      notifier(Edge()).erase(ev);
    728728      notifier(UEdge()).erase(uedge);
    729729      Parent::erase(uedge);
     
    10081008    /// Returns the base node (ie. the source in this case) of the iterator
    10091009    Node baseNode(const OutEdgeIt &e) const {
    1010       return Parent::source((Edge&)e);
     1010      return Parent::source(static_cast<const Edge&>(e));
    10111011    }
    10121012    /// \brief Running node of the iterator
     
    10151015    /// iterator
    10161016    Node runningNode(const OutEdgeIt &e) const {
    1017       return Parent::target((Edge&)e);
     1017      return Parent::target(static_cast<const Edge&>(e));
    10181018    }
    10191019 
     
    10221022    /// Returns the base node (ie. the target in this case) of the iterator
    10231023    Node baseNode(const InEdgeIt &e) const {
    1024       return Parent::target((Edge&)e);
     1024      return Parent::target(static_cast<const Edge&>(e));
    10251025    }
    10261026    /// \brief Running node of the iterator
     
    10291029    /// iterator
    10301030    Node runningNode(const InEdgeIt &e) const {
    1031       return Parent::source((Edge&)e);
     1031      return Parent::source(static_cast<const Edge&>(e));
    10321032    }
    10331033 
     
    12961296    }
    12971297 
    1298     UEdge addEdge(const Node& source, const Node& target) {
    1299       UEdge uedge = Parent::addEdge(source, target);
     1298    UEdge addEdge(const Node& s, const Node& t) {
     1299      UEdge uedge = Parent::addEdge(s, t);
    13001300      notifier(UEdge()).add(uedge);
    13011301   
    1302       std::vector<Edge> edges;
    1303       edges.push_back(Parent::direct(uedge, true));
    1304       edges.push_back(Parent::direct(uedge, false));
    1305       notifier(Edge()).add(edges);
     1302      std::vector<Edge> ev;
     1303      ev.push_back(Parent::direct(uedge, true));
     1304      ev.push_back(Parent::direct(uedge, false));
     1305      notifier(Edge()).add(ev);
    13061306   
    13071307      return uedge;
     
    13521352   
    13531353    void erase(const UEdge& uedge) {
    1354       std::vector<Edge> edges;
    1355       edges.push_back(Parent::direct(uedge, true));
    1356       edges.push_back(Parent::direct(uedge, false));
    1357       notifier(Edge()).erase(edges);
     1354      std::vector<Edge> ev;
     1355      ev.push_back(Parent::direct(uedge, true));
     1356      ev.push_back(Parent::direct(uedge, false));
     1357      notifier(Edge()).erase(ev);
    13581358      notifier(UEdge()).erase(uedge);
    13591359      Parent::erase(uedge);
Note: See TracChangeset for help on using the changeset viewer.