[Lemon-commits] [lemon_svn] alpar: r1058 - hugo/branches/hugo++/src/hugo
Lemon SVN
svn at lemon.cs.elte.hu
Mon Nov 6 20:43:00 CET 2006
Author: alpar
Date: Mon Aug 30 10:15:15 2004
New Revision: 1058
Modified:
hugo/branches/hugo++/src/hugo/list_graph.h
Log:
Some changes to compile with icc.
(Sometimes it requires an explicit 'this->'. Strange...)
Modified: hugo/branches/hugo++/src/hugo/list_graph.h
==============================================================================
--- hugo/branches/hugo++/src/hugo/list_graph.h (original)
+++ hugo/branches/hugo++/src/hugo/list_graph.h Mon Aug 30 10:15:15 2004
@@ -1542,17 +1542,17 @@
{
//FIXME: What if there are empty Id's?
//FIXME: Can I use 'this' in a constructor?
- G->dyn_edge_maps.push_back(this);
+ this->G->dyn_edge_maps.push_back(this);
}
EdgeMap(const EdgeSet &_G,const T &t) :
DynMapBase<Edge>(_G), container(_G.maxEdgeId(),t)
{
- G->dyn_edge_maps.push_back(this);
+ this->G->dyn_edge_maps.push_back(this);
}
EdgeMap(const EdgeMap<T> &m) :
DynMapBase<Edge>(*m.G), container(m.container)
{
- G->dyn_edge_maps.push_back(this);
+ this->G->dyn_edge_maps.push_back(this);
}
///\todo It can copy between different types.
@@ -1560,7 +1560,7 @@
template<typename TT> EdgeMap(const EdgeMap<TT> &m) :
DynMapBase<Edge>(*m.G), container(m.container.size())
{
- G->dyn_edge_maps.push_back(this);
+ this->G->dyn_edge_maps.push_back(this);
typename std::vector<TT>::const_iterator i;
for(typename std::vector<TT>::const_iterator i=m.container.begin();
i!=m.container.end();
@@ -1569,15 +1569,15 @@
}
~EdgeMap()
{
- if(G) {
+ if(this->G) {
typename std::vector<DynMapBase<Edge>* >::iterator i;
- for(i=G->dyn_edge_maps.begin();
- i!=G->dyn_edge_maps.end() && *i!=this; ++i) ;
+ for(i=this->G->dyn_edge_maps.begin();
+ i!=this->G->dyn_edge_maps.end() && *i!=this; ++i) ;
//if(*i==this) G->dyn_edge_maps.erase(i); //Way too slow...
//A better way to do that: (Is this really important?)
if(*i==this) {
- *i=G->dyn_edge_maps.back();
- G->dyn_edge_maps.pop_back();
+ *i=this->G->dyn_edge_maps.back();
+ this->G->dyn_edge_maps.pop_back();
}
}
}
@@ -1590,16 +1590,16 @@
///\bug This doesn't work. Why?
/// void set(Edge n, T a) { container[n.n]=a; }
- void set(Edge n, T a) { container[G->id(n)]=a; }
+ void set(Edge n, T a) { container[this->G->id(n)]=a; }
//T get(Edge n) const { return container[n.n]; }
typename std::vector<T>::reference
///\bug This doesn't work. Why?
/// operator[](Edge n) { return container[n.n]; }
- operator[](Edge n) { return container[G->id(n)]; }
+ operator[](Edge n) { return container[this->G->id(n)]; }
typename std::vector<T>::const_reference
///\bug This doesn't work. Why?
/// operator[](Edge n) const { return container[n.n]; }
- operator[](Edge n) const { return container[G->id(n)]; }
+ operator[](Edge n) const { return container[this->G->id(n)]; }
///\warning There is no safety check at all!
///Using operator = between maps attached to different graph may
More information about the Lemon-commits
mailing list