summaryrefslogtreecommitdiff
path: root/src/bin/eolian_cxx
diff options
context:
space:
mode:
authorSavio Sena <savio@expertisesolutions.com.br>2014-09-16 18:16:56 -0300
committerSavio Sena <savio@expertisesolutions.com.br>2014-09-16 19:17:57 -0300
commit991027ac9b7e30d74b81c045d5ff5f8b7527f957 (patch)
tree3f0587a584729072572ae7627ff5a609205bd755 /src/bin/eolian_cxx
parentbcff50fb72f80145010c38f3cc61c1866fec600d (diff)
eolian-cxx: Remove warnings during release compilation.
Diffstat (limited to 'src/bin/eolian_cxx')
-rw-r--r--src/bin/eolian_cxx/eolian_wrappers.hh16
-rw-r--r--src/bin/eolian_cxx/type_lookup.hh25
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 891771695f..80efcd23e9 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)
114inline efl::eolian::eo_class::eo_class_type 114inline efl::eolian::eo_class::eo_class_type
115class_type(Eolian_Class const& klass) 115class_type(Eolian_Class const& klass)
116{ 116{
117 efl::eolian::eo_class::eo_class_type type; 117 efl::eolian::eo_class::eo_class_type type = {};
118 Eolian_Class_Type cls_type = ::eolian_class_type_get(&klass); 118 Eolian_Class_Type cls_type = ::eolian_class_type_get(&klass);
119 119
120 if (cls_type == EOLIAN_CLASS_REGULAR) 120 if (cls_type == EOLIAN_CLASS_REGULAR)
@@ -125,7 +125,7 @@ class_type(Eolian_Class const& klass)
125 type = efl::eolian::eo_class::mixin_; 125 type = efl::eolian::eo_class::mixin_;
126 else if (cls_type == EOLIAN_CLASS_INTERFACE) 126 else if (cls_type == EOLIAN_CLASS_INTERFACE)
127 type = efl::eolian::eo_class::interface_; 127 type = efl::eolian::eo_class::interface_;
128 else assert(false); 128 else { assert(false); }
129 129
130 return type; 130 return type;
131} 131}
@@ -215,15 +215,13 @@ function_is_visible(Eolian_Function const& func, Eolian_Function_Type func_type)
215inline bool 215inline bool
216function_is_visible(Eolian_Function const& func, method_t) 216function_is_visible(Eolian_Function const& func, method_t)
217{ 217{
218 return (::eolian_function_scope_get(&func) == EOLIAN_SCOPE_PUBLIC && 218 return function_is_visible(func, method_t::value);
219 ! ::eolian_function_is_legacy_only(&func, method_t::value));
220} 219}
221 220
222inline bool 221inline bool
223function_is_visible(Eolian_Function const& func) 222function_is_visible(Eolian_Function const& func)
224{ 223{
225 return (::eolian_function_scope_get(&func) == EOLIAN_SCOPE_PUBLIC && 224 return function_is_visible(func, function_op_type(func));
226 ! ::eolian_function_is_legacy_only(&func, function_op_type(func)));
227} 225}
228 226
229inline bool 227inline bool
@@ -231,10 +229,10 @@ function_is_visible(Eolian_Constructor const& ctor_)
231{ 229{
232 Eolian_Function const* func = ::eolian_constructor_function_get(&ctor_); 230 Eolian_Function const* func = ::eolian_constructor_function_get(&ctor_);
233 Eolian_Class const* cls = ::eolian_constructor_class_get(&ctor_); 231 Eolian_Class const* cls = ::eolian_constructor_class_get(&ctor_);
234 assert(::eolian_class_ctor_enable_get(cls));
235 assert(!!cls);
236 assert(!!func); 232 assert(!!func);
237 return function_is_visible(*func, method_t::value); 233 assert(!!cls);
234 return (::eolian_class_ctor_enable_get(cls) &&
235 function_is_visible(*func, method_t::value));
238} 236}
239 237
240inline efl::eolian::eolian_type_instance 238inline efl::eolian::eolian_type_instance
diff --git a/src/bin/eolian_cxx/type_lookup.hh b/src/bin/eolian_cxx/type_lookup.hh
index dfecf5050c..d366f5d87a 100644
--- a/src/bin/eolian_cxx/type_lookup.hh
+++ b/src/bin/eolian_cxx/type_lookup.hh
@@ -23,6 +23,12 @@ namespace eolian_cxx {
23typedef std::vector<efl::eolian::eolian_type> lookup_table_type; 23typedef std::vector<efl::eolian::eolian_type> lookup_table_type;
24extern const lookup_table_type type_lookup_table; 24extern const lookup_table_type type_lookup_table;
25 25
26inline bool
27type_is_complex(Eolian_Type const& type)
28{
29 return ::eolian_type_type_get(&type) == EOLIAN_TYPE_COMPLEX;
30}
31
26inline efl::eolian::eolian_type 32inline efl::eolian::eolian_type
27type_from_eolian(Eolian_Type const& type) 33type_from_eolian(Eolian_Type const& type)
28{ 34{
@@ -51,11 +57,20 @@ type_lookup(const Eolian_Type* type,
51{ 57{
52 if (type == NULL) return { efl::eolian::void_type }; // XXX shouldn't 58 if (type == NULL) return { efl::eolian::void_type }; // XXX shouldn't
53 59
54 std::vector<Eolian_Type const*> types; types.push_back(type); 60 std::vector<Eolian_Type const*> types;
55 efl::eina::iterator<Eolian_Type const> iterator ( ::eolian_type_subtypes_get(type) ); 61 types.push_back(type);
56 while(iterator != efl::eina::iterator<Eolian_Type const>()) 62
57 if(Eolian_Type const* t = &*iterator) 63 if (type_is_complex(*type))
58 types.push_back(t), ++iterator; 64 {
65 efl::eina::iterator<Eolian_Type const> end;
66 efl::eina::iterator<Eolian_Type const> it
67 (::eolian_type_subtypes_get(type));
68 while(it != end)
69 {
70 if(Eolian_Type const* t = &*it)
71 types.push_back(t), ++it;
72 }
73 }
59 74
60 efl::eolian::eolian_type_instance v(types.size()); 75 efl::eolian::eolian_type_instance v(types.size());
61 for (std::size_t i = 0; i != types.size(); ++i) 76 for (std::size_t i = 0; i != types.size(); ++i)