raster pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=6436618c92c9e1c250dba78a498d9e33e42d82d5
commit 6436618c92c9e1c250dba78a498d9e33e42d82d5 Author: Felipe Magno de Almeida <fel...@expertisesolutions.com.br> Date: Wed Apr 9 19:11:46 2014 +0900 eet-cxx: Renamed a few local variables and avoided other warnings Summary: Renamed a few local variables to avoid excessive warnings with -Wshadow warning. Also made construction of a few objects pass all arguments for explicit initialization to avoid other harmless warning. Reviewers: cedric, tasn, smohanty, raster Reviewed By: raster CC: cedric Differential Revision: https://phab.enlightenment.org/D698 --- src/bindings/ecore_cxx/Ecore.hh | 2 +- src/bindings/eet_cxx/Eet.hh | 14 ++++---------- src/bindings/eina_cxx/eina_inarray.hh | 4 ++-- 3 files changed, 7 insertions(+), 13 deletions(-) diff --git a/src/bindings/ecore_cxx/Ecore.hh b/src/bindings/ecore_cxx/Ecore.hh index b121ba9..ad9dcab 100644 --- a/src/bindings/ecore_cxx/Ecore.hh +++ b/src/bindings/ecore_cxx/Ecore.hh @@ -153,7 +153,7 @@ typename std::result_of<F()>::type main_loop_thread_safe_call_sync(F&& f) { typedef typename std::result_of<F()>::type result_type; - _data<F> data {f}; + _data<F> data {f, nullptr, {}}; ::ecore_main_loop_thread_safe_call_sync (&ecore::_ecore_main_loop_thread_safe_call_sync_callback<F>, &data); return _get_return_value(data, _identity<result_type>()); diff --git a/src/bindings/eet_cxx/Eet.hh b/src/bindings/eet_cxx/Eet.hh index f725c68..a350696 100644 --- a/src/bindings/eet_cxx/Eet.hh +++ b/src/bindings/eet_cxx/Eet.hh @@ -185,16 +185,10 @@ typename _detail::descriptor_type typedef typename _detail::descriptor_type <object_type, _detail::member_info<F, D, OArgs...>, Args...>::type descriptor_type; - ::Eet_Data_Descriptor_Class cls - { - EET_DATA_DESCRIPTOR_CLASS_VERSION - , name - , sizeof(object_type) - , { - & _detail::_allocate<object_type> - , & _detail::_deallocate<object_type> - } - }; + ::Eet_Data_Descriptor_Class cls; + eet_eina_file_data_descriptor_class_set(&cls, sizeof(cls), name, sizeof(object_type)); + cls.func.mem_alloc = & _detail::_allocate<object_type>; + cls.func.mem_free = & _detail::_deallocate<object_type>; ::Eet_Data_Descriptor* native_handle = eet_data_descriptor_stream_new(&cls); if(!native_handle) throw std::runtime_error(""); diff --git a/src/bindings/eina_cxx/eina_inarray.hh b/src/bindings/eina_cxx/eina_inarray.hh index a82eaa7..1eb8ae3 100644 --- a/src/bindings/eina_cxx/eina_inarray.hh +++ b/src/bindings/eina_cxx/eina_inarray.hh @@ -523,7 +523,7 @@ public: new (&*dest++) T(*src); } iterator j = i; - for(size_type i = 0;i != n;++i) + for(size_type k = 0;k != n;++k) { if(j < end) *j = t; @@ -552,7 +552,7 @@ public: new (&*first++) T(*old_first); old_first++->~T(); } - for(size_type i = 0;i != n;++i) + for(size_type j = 0;j != n;++j) new (&*first++) T(t); std::size_t diff = last - first; assert(diff == _array->len - index - n); --