|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r52158 - trunk/boost/graph
From: jewillco_at_[hidden]
Date: 2009-04-03 10:57:28
Author: jewillco
Date: 2009-04-03 10:57:27 EDT (Fri, 03 Apr 2009)
New Revision: 52158
URL: http://svn.boost.org/trac/boost/changeset/52158
Log:
Fully qualifying std::sqrt to fix compile errors, and removing "using" statements that are never used
Text files modified:
trunk/boost/graph/fruchterman_reingold.hpp | 17 +----------------
1 files changed, 1 insertions(+), 16 deletions(-)
Modified: trunk/boost/graph/fruchterman_reingold.hpp
==============================================================================
--- trunk/boost/graph/fruchterman_reingold.hpp (original)
+++ trunk/boost/graph/fruchterman_reingold.hpp 2009-04-03 10:57:27 EDT (Fri, 03 Apr 2009)
@@ -104,10 +104,7 @@
PositionMap position, const Graph& g)
: topology(topology), extent(extent), origin(origin), position(position)
{
-#ifndef BOOST_NO_STDC_NAMESPACE
- using std::sqrt;
-#endif // BOOST_NO_STDC_NAMESPACE
- two_k = 2. * topology.volume(extent) / sqrt(num_vertices(g));
+ two_k = 2. * topology.volume(extent) / std::sqrt(num_vertices(g));
}
template<typename Graph, typename ApplyForce >
@@ -118,10 +115,6 @@
typedef std::list<vertex_descriptor> bucket_t;
typedef std::vector<bucket_t> buckets_t;
-#ifndef BOOST_NO_STDC_NAMESPACE
- using std::sqrt;
-#endif // BOOST_NO_STDC_NAMESPACE
-
std::size_t columns = std::size_t(extent[0] / two_k + 1.);
std::size_t rows = std::size_t(extent[1] / two_k + 1.);
buckets_t buckets(rows * columns);
@@ -247,9 +240,6 @@
void operator()(vertex_descriptor u, vertex_descriptor v)
{
-#ifndef BOOST_NO_STDC_NAMESPACE
- using std::sqrt;
-#endif // BOOST_NO_STDC_NAMESPACE
if (u != v) {
// When the vertices land on top of each other, move the
// first vertex away from the boundaries.
@@ -302,11 +292,6 @@
typedef typename graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef typename graph_traits<Graph>::edge_iterator edge_iterator;
-#ifndef BOOST_NO_STDC_NAMESPACE
- using std::sqrt;
- using std::pow;
-#endif // BOOST_NO_STDC_NAMESPACE
-
double volume = 1.;
for (std::size_t i = 0; i < Topology::point_difference_type::dimensions; ++i)
volume *= extent[i];
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk