[GIT] ppl/ppl(floating_point): Fixed erroneous use of const&.

Module: ppl/ppl Branch: floating_point Commit: b1fbafc2fb396154d0fa5fd4ee2d0eda860e0e3b URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=b1fbafc2fb396...
Author: Fabio Bossi bossi@cs.unipr.it Date: Sat Sep 5 20:07:04 2009 +0200
Fixed erroneous use of const&.
---
src/Floating_Point_Expression.templates.hh | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/Floating_Point_Expression.templates.hh b/src/Floating_Point_Expression.templates.hh index de52808..03654fb 100644 --- a/src/Floating_Point_Expression.templates.hh +++ b/src/Floating_Point_Expression.templates.hh @@ -40,9 +40,9 @@ Floating_Point_Expression<FP_Interval_Type, FP_Format> pow(2, -FP_Format::fraction_bits)));
// Handle the inhomogeneous term. - const FP_Interval_Type& current_term = lf.inhomogeneous_term(); - FP_Interval_Type current_multiplier(std::max(abs(current_term.lower()), - abs(current_term.upper()))); + const FP_Interval_Type* current_term = &lf.inhomogeneous_term(); + FP_Interval_Type current_multiplier(std::max(abs(current_term->lower()), + abs(current_term->upper()))); FP_Linear_Form current_result_term(current_multiplier); current_result_term *= error_propagator; result = FP_Linear_Form(current_result_term); @@ -50,9 +50,9 @@ Floating_Point_Expression<FP_Interval_Type, FP_Format> // Handle the other terms. dimension_type dimension = lf.space_dimension(); for (dimension_type i = 0; i < dimension; ++i) { - current_term = lf.coefficient(Variable(i)); - current_multiplier = FP_Interval_Type(std::max(abs(current_term.lower()), - abs(current_term.upper()))); + current_term = &lf.coefficient(Variable(i)); + current_multiplier = FP_Interval_Type(std::max(abs(current_term->lower()), + abs(current_term->upper()))); current_result_term = FP_Linear_Form(Variable(i)); current_result_term *= current_multiplier; current_result_term *= error_propagator;
participants (1)
-
Fabio Bossi