eina_cxx: fix a bug in efl::eina::range_inlist constructor.

Summary: Fixes const propagation of range_inlist.

Reviewers: cedric, raster, seoz, raoulh, Andreas, smohanty

CC: felipealmeida, cedric

Differential Revision: https://phab.enlightenment.org/D796

Signed-off-by: Cedric Bail <cedric.bail@free.fr>
This commit is contained in:
Savio Sena 2014-04-26 16:26:33 +02:00 committed by Cedric Bail
parent 521363a6d5
commit 1cec8103c7
2 changed files with 4 additions and 3 deletions

View File

@ -247,8 +247,9 @@ struct range_inlist : _range_template<T, _inlist_access_traits>
{
typedef _range_template<T, _inlist_access_traits> _base_type;
typedef typename _base_type::value_type value_type;
typedef typename _base_type::native_handle_type native_handle_type;
range_inlist(Eina_Inlist* list)
range_inlist(native_handle_type list)
: _base_type(list) {}
template <typename Allocator>
range_inlist(inlist<value_type, Allocator>& list)

View File

@ -78,7 +78,7 @@ struct _const_range_template
std::swap(_handle, other._handle);
}
protected:
native_handle_type _handle;
native_handle_type _handle;
};
template <typename T, typename Traits>
@ -141,7 +141,7 @@ struct _range_template : private std::conditional
typedef typename std::remove_const<T>::type value_type;
typedef typename std::conditional<is_mutable::value, _mutable_range_template<value_type, Traits>
, _const_range_template<value_type, Traits> >::type _base_type;
typedef typename Traits::template native_handle<T>::type native_handle_type;
typedef typename _base_type::native_handle_type native_handle_type;
typedef value_type& reference;
typedef value_type const& const_reference;