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
This commit is contained in:
Felipe Magno de Almeida 2014-04-09 19:11:46 +09:00 committed by Carsten Haitzler (Rasterman)
parent 99962a5893
commit 6436618c92
3 changed files with 7 additions and 13 deletions

View File

@ -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>());

View File

@ -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("");

View File

@ -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);