|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r55382 - sandbox/itl/boost/itl
From: afojgo_at_[hidden]
Date: 2009-08-03 06:58:20
Author: jofaber
Date: 2009-08-03 06:58:19 EDT (Mon, 03 Aug 2009)
New Revision: 55382
URL: http://svn.boost.org/trac/boost/changeset/55382
Log:
Refactoring: Changed parameter passing for iterators for algorithm unifier functions to 'pass by value'. Stable {msvc-9.0 r+d, gcc-3.4.4}
Text files modified:
sandbox/itl/boost/itl/interval_base_map.hpp | 8 ++++----
sandbox/itl/boost/itl/interval_base_set.hpp | 10 +++++-----
sandbox/itl/boost/itl/map.hpp | 6 +++---
sandbox/itl/boost/itl/set.hpp | 6 +++---
4 files changed, 15 insertions(+), 15 deletions(-)
Modified: sandbox/itl/boost/itl/interval_base_map.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_map.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_map.hpp 2009-08-03 06:58:19 EDT (Mon, 03 Aug 2009)
@@ -639,16 +639,16 @@
//==========================================================================
template<typename IteratorT>
- static const key_type& key_value(IteratorT& value_){ return (*value_).first; }
+ static const key_type& key_value(IteratorT value_){ return (*value_).first; }
template<typename IteratorT>
- static const data_type& data_value(IteratorT& value_){ return (*value_).second; }
+ static const data_type& data_value(IteratorT value_){ return (*value_).second; }
template<typename IteratorT>
- static codomain_type codomain_value(IteratorT& value_){ return (*value_).second; }
+ static codomain_type codomain_value(IteratorT value_){ return (*value_).second; }
template<typename LeftIterT, typename RightIterT>
- static bool key_less(LeftIterT& lhs_, RightIterT& rhs_) { return key_compare()((*lhs_).first, (*rhs_).first); }
+ static bool key_less(LeftIterT lhs_, RightIterT rhs_) { return key_compare()((*lhs_).first, (*rhs_).first); }
static value_type make_domain_element(const domain_type& dom_val, const codomain_type& codom_val)
{ return value_type(interval_type(dom_val), codom_val); }
Modified: sandbox/itl/boost/itl/interval_base_set.hpp
==============================================================================
--- sandbox/itl/boost/itl/interval_base_set.hpp (original)
+++ sandbox/itl/boost/itl/interval_base_set.hpp 2009-08-03 06:58:19 EDT (Mon, 03 Aug 2009)
@@ -312,12 +312,12 @@
/** Returns \c true, if element \c key is found in \c *this map.
Complexity: logarithmic. */
bool intersects(const element_type& key)const
- { return _map.find(interval_type(key)) != _map.end(); }
+ { return _set.find(interval_type(key)) != _set.end(); }
/** Returns \c true, if \c inter_val intersects with \c *this map.
Complexity: logarithmic. */
bool intersects(const interval_type& inter_val)const
- { return _map.find(inter_val) != _map.end(); }
+ { return _set.find(inter_val) != _set.end(); }
//==========================================================================
//= Symmetric difference
@@ -391,14 +391,14 @@
//==========================================================================
template<typename IteratorT>
- static const key_type& key_value(IteratorT& value_){ return (*value_); }
+ static const key_type& key_value(IteratorT value_){ return (*value_); }
template<typename IteratorT>
- static codomain_type codomain_value(IteratorT& value_)
+ static codomain_type codomain_value(IteratorT value_)
{ return (*value_).empty()? codomain_type() : (*value_).lower(); }
template<typename LeftIterT, typename RightIterT>
- static bool key_less(LeftIterT& lhs_, RightIterT& rhs_)
+ static bool key_less(LeftIterT lhs_, RightIterT rhs_)
{ return key_compare()(*lhs_, *rhs_); }
static value_type make_domain_element(const domain_type& dom_val, const codomain_type& codom_val)
Modified: sandbox/itl/boost/itl/map.hpp
==============================================================================
--- sandbox/itl/boost/itl/map.hpp (original)
+++ sandbox/itl/boost/itl/map.hpp 2009-08-03 06:58:19 EDT (Mon, 03 Aug 2009)
@@ -299,18 +299,18 @@
/** \c key_value allows for a uniform access to \c key_values which is
is used for common algorithms on sets and maps. */
template<typename IteratorT>
- static const key_type& key_value(IteratorT& value_)
+ static const key_type& key_value(IteratorT value_)
{ return (*value_).first; }
/** \c data_value allows for a uniform access to \c data_values which is
is used for common algorithms on sets and maps. */
template<typename IteratorT>
- static const data_type& data_value(IteratorT& value_){ return (*value_).second; }
+ static const data_type& data_value(IteratorT value_){ return (*value_).second; }
/** \c key_less allows for a uniform notation of key comparison which
is used for common algorithms on sets and maps. */
template<typename LeftIterT, typename RightIterT>
- static bool key_less(LeftIterT& lhs_, RightIterT& rhs_)
+ static bool key_less(LeftIterT lhs_, RightIterT rhs_)
{ return key_compare()((*lhs_).first,(*rhs_).first); }
/** \c iterative_size() yields the number of elements that is visited
Modified: sandbox/itl/boost/itl/set.hpp
==============================================================================
--- sandbox/itl/boost/itl/set.hpp (original)
+++ sandbox/itl/boost/itl/set.hpp 2009-08-03 06:58:19 EDT (Mon, 03 Aug 2009)
@@ -195,17 +195,17 @@
/** \c key_value allows for a uniform access to \c key_values which is
is used for common algorithms on sets and maps. */
template<typename IteratorT>
- static const key_type& key_value(IteratorT& value_){ return (*value_); }
+ static const key_type& key_value(IteratorT value_){ return (*value_); }
/** \c data_value allows for a uniform access to \c data_values which is
is used for common algorithms on sets and maps. */
template<typename IteratorT>
- static const data_type& data_value(IteratorT& value_){ return (*value_); }
+ static const data_type& data_value(IteratorT value_){ return (*value_); }
/** \c key_less allows for a uniform notation of key comparison which
is used for common algorithms on sets and maps. */
template<typename LeftIterT, typename RightIterT>
- static bool key_less(LeftIterT& lhs_, RightIterT& rhs_)
+ static bool key_less(LeftIterT lhs_, RightIterT rhs_)
{ return key_compare()(*lhs_, *rhs_); }
/** \c make_element allows for a uniform notation of key comparison which
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