From d2d880b4e07bd5cc67e6ffb61a4e7389162e51d0 Mon Sep 17 00:00:00 2001 From: Jeremiah Willcock Date: Mon, 27 Aug 2012 19:05:25 +0000 Subject: [PATCH] =?UTF-8?q?Made=20edge=20weight=20a=20reference=20based=20?= =?UTF-8?q?on=20a=20suggestion=20by=20Tristram=20Gr=C3=A4bener;=20made=20v?= =?UTF-8?q?ertex=20distance=20variables=20const=20values?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [SVN r80264] --- include/boost/graph/relax.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/boost/graph/relax.hpp b/include/boost/graph/relax.hpp index 46857960..9c0d0260 100644 --- a/include/boost/graph/relax.hpp +++ b/include/boost/graph/relax.hpp @@ -49,8 +49,9 @@ namespace boost { Vertex u = source(e, g), v = target(e, g); typedef typename property_traits::value_type D; typedef typename property_traits::value_type W; - D d_u = get(d, u), d_v = get(d, v); - W w_e = get(w, e); + const D d_u = get(d, u); + const D d_v = get(d, v); + const W& w_e = get(w, e); // The redundant gets in the return statements are to ensure that extra // floating-point precision in x87 registers does not lead to relax()