https://svn.lrde.epita.fr/svn/oln/trunk/milena
Index: ChangeLog
from Roland Levillain <roland(a)lrde.epita.fr>
Improve ctors of mln::graph_psite and mln::line_graph_psite.
* mln/core/graph_psite.hh (super_): New typedef.
(mln::graph_psite::graph_psite): Explicitly call the ctor of the
super class.
* mln/core/line_graph_psite.hh (super_): New typedef.
(mln::line_graph_psite::line_graph_psite): Explicitly call the
ctor of the super class.
graph_psite.hh | 10 +++++++---
line_graph_psite.hh | 10 +++++++---
2 files changed, 14 insertions(+), 6 deletions(-)
Index: mln/core/graph_psite.hh
--- mln/core/graph_psite.hh (revision 1827)
+++ mln/core/graph_psite.hh (working copy)
@@ -46,6 +46,7 @@
class graph_psite : public Point_Site< graph_psite<P> >
{
typedef graph_psite<P> self_;
+ typedef Point_Site<self_> super_;
public:
typedef mln_mesh(P) mesh;
@@ -100,7 +101,8 @@
inline
graph_psite<P>::graph_psite()
// Dummy initializations.
- : pg_(0),
+ : super_(),
+ pg_(0),
id_(-1)
{
}
@@ -108,7 +110,8 @@
template<typename P>
inline
graph_psite<P>::graph_psite(const p_graph<P>& g, util::node_id id)
- : pg_(&g),
+ : super_(),
+ pg_(&g),
id_(id)
{
}
@@ -116,7 +119,8 @@
template<typename P>
inline
graph_psite<P>::graph_psite(const graph_psite<P>& rhs)
- : pg_(rhs.pg_),
+ : super_(),
+ pg_(rhs.pg_),
id_(rhs.id_)
{
}
Index: mln/core/line_graph_psite.hh
--- mln/core/line_graph_psite.hh (revision 1827)
+++ mln/core/line_graph_psite.hh (working copy)
@@ -49,6 +49,7 @@
class line_graph_psite : public Point_Site< line_graph_psite<P> >
{
typedef line_graph_psite<P> self_;
+ typedef Point_Site<self_> super_;
public:
typedef P point;
@@ -138,7 +139,8 @@
inline
line_graph_psite<P>::line_graph_psite()
// Dummy initializations.
- : plg_(0),
+ : super_(),
+ plg_(0),
id_(-1),
p_()
{
@@ -148,7 +150,8 @@
inline
line_graph_psite<P>::line_graph_psite(const p_line_graph<P>& plg,
util::edge_id id)
- : plg_(&plg),
+ : super_(),
+ plg_(&plg),
id_(id),
p_()
{
@@ -157,7 +160,8 @@
template<typename P>
inline
line_graph_psite<P>::line_graph_psite(const line_graph_psite<P>& rhs)
- : plg_(rhs.plg_),
+ : super_(),
+ plg_(rhs.plg_),
id_(rhs.id_),
p_()
{