2
0
mirror of https://github.com/boostorg/graph.git synced 2026-02-01 20:42:11 +00:00

Made edge weight a reference based on a suggestion by Tristram Gräbener; made vertex distance variables const values

[SVN r80264]
This commit is contained in:
Jeremiah Willcock
2012-08-27 19:05:25 +00:00
parent 88101e0ab0
commit d2d880b4e0

View File

@@ -49,8 +49,9 @@ namespace boost {
Vertex u = source(e, g), v = target(e, g);
typedef typename property_traits<DistanceMap>::value_type D;
typedef typename property_traits<WeightMap>::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()