savio pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=991027ac9b7e30d74b81c045d5ff5f8b7527f957
commit 991027ac9b7e30d74b81c045d5ff5f8b7527f957 Author: Savio Sena <sa...@expertisesolutions.com.br> Date: Tue Sep 16 18:16:56 2014 -0300 eolian-cxx: Remove warnings during release compilation. --- src/bin/eolian_cxx/eolian_wrappers.hh | 16 +++++++--------- src/bin/eolian_cxx/type_lookup.hh | 25 ++++++++++++++++++++----- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/src/bin/eolian_cxx/eolian_wrappers.hh b/src/bin/eolian_cxx/eolian_wrappers.hh index 8917716..80efcd2 100644 --- a/src/bin/eolian_cxx/eolian_wrappers.hh +++ b/src/bin/eolian_cxx/eolian_wrappers.hh @@ -114,7 +114,7 @@ class_prefix(Eolian_Class const& klass) inline efl::eolian::eo_class::eo_class_type class_type(Eolian_Class const& klass) { - efl::eolian::eo_class::eo_class_type type; + efl::eolian::eo_class::eo_class_type type = {}; Eolian_Class_Type cls_type = ::eolian_class_type_get(&klass); if (cls_type == EOLIAN_CLASS_REGULAR) @@ -125,7 +125,7 @@ class_type(Eolian_Class const& klass) type = efl::eolian::eo_class::mixin_; else if (cls_type == EOLIAN_CLASS_INTERFACE) type = efl::eolian::eo_class::interface_; - else assert(false); + else { assert(false); } return type; } @@ -215,15 +215,13 @@ function_is_visible(Eolian_Function const& func, Eolian_Function_Type func_type) inline bool function_is_visible(Eolian_Function const& func, method_t) { - return (::eolian_function_scope_get(&func) == EOLIAN_SCOPE_PUBLIC && - ! ::eolian_function_is_legacy_only(&func, method_t::value)); + return function_is_visible(func, method_t::value); } inline bool function_is_visible(Eolian_Function const& func) { - return (::eolian_function_scope_get(&func) == EOLIAN_SCOPE_PUBLIC && - ! ::eolian_function_is_legacy_only(&func, function_op_type(func))); + return function_is_visible(func, function_op_type(func)); } inline bool @@ -231,10 +229,10 @@ function_is_visible(Eolian_Constructor const& ctor_) { Eolian_Function const* func = ::eolian_constructor_function_get(&ctor_); Eolian_Class const* cls = ::eolian_constructor_class_get(&ctor_); - assert(::eolian_class_ctor_enable_get(cls)); - assert(!!cls); assert(!!func); - return function_is_visible(*func, method_t::value); + assert(!!cls); + return (::eolian_class_ctor_enable_get(cls) && + function_is_visible(*func, method_t::value)); } inline efl::eolian::eolian_type_instance diff --git a/src/bin/eolian_cxx/type_lookup.hh b/src/bin/eolian_cxx/type_lookup.hh index dfecf50..d366f5d 100644 --- a/src/bin/eolian_cxx/type_lookup.hh +++ b/src/bin/eolian_cxx/type_lookup.hh @@ -23,6 +23,12 @@ namespace eolian_cxx { typedef std::vector<efl::eolian::eolian_type> lookup_table_type; extern const lookup_table_type type_lookup_table; +inline bool +type_is_complex(Eolian_Type const& type) +{ + return ::eolian_type_type_get(&type) == EOLIAN_TYPE_COMPLEX; +} + inline efl::eolian::eolian_type type_from_eolian(Eolian_Type const& type) { @@ -51,11 +57,20 @@ type_lookup(const Eolian_Type* type, { if (type == NULL) return { efl::eolian::void_type }; // XXX shouldn't - std::vector<Eolian_Type const*> types; types.push_back(type); - efl::eina::iterator<Eolian_Type const> iterator ( ::eolian_type_subtypes_get(type) ); - while(iterator != efl::eina::iterator<Eolian_Type const>()) - if(Eolian_Type const* t = &*iterator) - types.push_back(t), ++iterator; + std::vector<Eolian_Type const*> types; + types.push_back(type); + + if (type_is_complex(*type)) + { + efl::eina::iterator<Eolian_Type const> end; + efl::eina::iterator<Eolian_Type const> it + (::eolian_type_subtypes_get(type)); + while(it != end) + { + if(Eolian_Type const* t = &*it) + types.push_back(t), ++it; + } + } efl::eolian::eolian_type_instance v(types.size()); for (std::size_t i = 0; i != types.size(); ++i) --