eina_cxx: fix a bug in efl::eina::range_inlist constructor.
authorSavio Sena <savio@expertisesolutions.com.br>
Sat, 26 Apr 2014 14:26:33 +0000 (16:26 +0200)
committerCedric Bail <cedric.bail@free.fr>
Sat, 26 Apr 2014 14:26:38 +0000 (16:26 +0200)
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>
src/bindings/eina_cxx/eina_inlist.hh
src/bindings/eina_cxx/eina_range_types.hh

index a0512096b503d4b24f6864fcc9421783e5ff0cfd..1a014d1404f1503ff5503e71f656a356aad2bea8 100644 (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)
index 217eef51487f817bfe3661e449a7073e89e72f65..2a63c321e6fab8ee077bb8e387e050f8c003628c 100644 (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;