Merge pull request #131 from mkaravel/fix/distance-unused-warning

[algorithms][distance] add a comment about the usage of boost::ignore_unused
This commit is contained in:
Barend Gehrels
2014-08-11 13:48:50 +02:00

View File

@@ -94,6 +94,12 @@ private:
m_r_tree.query(index::nearest(query_geometry, 1), &t_v);
BOOST_ASSERT( n > 0 );
// n above is unused outside BOOST_ASSERT, hence the call
// to boost::ignore_unused below
//
// however, t_v (initialized by the call to m_r_tree.query(...))
// is used below, which is why we cannot put the call to
// m_r_tree.query(...) inside BOOST_ASSERT
boost::ignore_unused(n);
comparable_return_type cd = dispatch::distance