eo-cxx: Add overload for Eina_Bool inout handling interoperability

Add convert_inout_impl overload to handle bool/Eina_Bool conversion in inout direction.
This commit is contained in:
Felipe Magno de Almeida 2017-07-27 13:19:49 -03:00
parent 45a767632d
commit 634f7d0dbb
1 changed files with 4 additions and 0 deletions

View File

@ -245,6 +245,10 @@ T* convert_inout_impl(T& v, tag<T, T*>)
{
return v;
}
inline Eina_Bool convert_inout_impl(bool v, tag<bool, Eina_Bool>)
{
return v ? EINA_TRUE : EINA_FALSE;
}
inline void* convert_inout_impl(void* v, tag<void, void>)
{
return v;