
URL: https://svn.lrde.epita.fr/svn/oln/trunk/milena ChangeLog: 2007-09-07 Matthieu Garrigues <garrigues.matthieu@lrde.epita.fr> fix compil in value_behavior.cc * sandbox/garrigues/value_behavior.cc: some fixes --- value_behavior.cc | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) Index: trunk/milena/sandbox/garrigues/value_behavior.cc =================================================================== --- trunk/milena/sandbox/garrigues/value_behavior.cc (revision 1086) +++ trunk/milena/sandbox/garrigues/value_behavior.cc (revision 1087) @@ -22,18 +22,21 @@ operator= (const typename behavior::to_compute& v) { this->v_ = behavior::compute(v); + return *this; } V& operator+= (const typename behavior::to_compute& v) { this->v_ = behavior::compute(this->v_ + v); + return *this; } V& operator-= (const typename behavior::to_compute& v) { this->v_ = behavior::compute(this->v_ - v); + return *this; } }; @@ -47,10 +50,10 @@ static val compute(to_compute n) { - if (props<val>::min() > n) - return props<val>::min(); - if (props<val>::max() < n) - return props<val>::max(); + if (mln_min(val) > n) + return mln_min(val); + if (mln_max(val) < n) + return mln_max(val); return n; }