forked from enlightenment/efl
eolian_cxx: Remove last usage of type_is_owned
Reviewers: q66, felipealmeida Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9866
This commit is contained in:
parent
acd9eb2466
commit
f6747d6822
|
@ -452,7 +452,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
|
||||||
switch( ::eolian_type_type_get(eolian_type))
|
switch( ::eolian_type_type_get(eolian_type))
|
||||||
{
|
{
|
||||||
case EOLIAN_TYPE_VOID:
|
case EOLIAN_TYPE_VOID:
|
||||||
original_type = attributes::regular_type_def{"void", {qualifiers(eolian_type), {}}, {}};
|
original_type = attributes::regular_type_def{"void", {qualifiers(eolian_type, is_moved), {}}, {}};
|
||||||
break;
|
break;
|
||||||
case EOLIAN_TYPE_REGULAR:
|
case EOLIAN_TYPE_REGULAR:
|
||||||
if (!stp)
|
if (!stp)
|
||||||
|
@ -474,12 +474,12 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
|
||||||
for(efl::eina::iterator<const char> namespace_iterator( ::eolian_type_namespaces_get(eolian_type))
|
for(efl::eina::iterator<const char> namespace_iterator( ::eolian_type_namespaces_get(eolian_type))
|
||||||
, namespace_last; namespace_iterator != namespace_last; ++namespace_iterator)
|
, namespace_last; namespace_iterator != namespace_last; ++namespace_iterator)
|
||||||
namespaces.push_back(&*namespace_iterator);
|
namespaces.push_back(&*namespace_iterator);
|
||||||
original_type = {regular_type_def{ ::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type), {}}, namespaces, type_type, is_undefined}};
|
original_type = {regular_type_def{ ::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved), {}}, namespaces, type_type, is_undefined}};
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
complex_type_def complex
|
complex_type_def complex
|
||||||
{{::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type), {}}, {}}, {}};
|
{{::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved), {}}, {}}, {}};
|
||||||
while (stp)
|
while (stp)
|
||||||
{
|
{
|
||||||
complex.subtypes.push_back({stp, unit, EOLIAN_C_TYPE_DEFAULT, eolian_type_is_move(stp)});
|
complex.subtypes.push_back({stp, unit, EOLIAN_C_TYPE_DEFAULT, eolian_type_is_move(stp)});
|
||||||
|
@ -491,7 +491,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
|
||||||
case EOLIAN_TYPE_CLASS:
|
case EOLIAN_TYPE_CLASS:
|
||||||
{
|
{
|
||||||
Eolian_Class const* klass = eolian_type_class_get(eolian_type);
|
Eolian_Class const* klass = eolian_type_class_get(eolian_type);
|
||||||
original_type = klass_name(klass, {qualifiers(eolian_type), {}});
|
original_type = klass_name(klass, {qualifiers(eolian_type, is_moved), {}});
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -72,9 +72,9 @@ inline qualifier_bool operator^(qualifier_bool lhs, qualifier_info rhs)
|
||||||
return lhs;
|
return lhs;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline qualifier_info qualifiers(Eolian_Type const* type)
|
inline qualifier_info qualifiers(Eolian_Type const* type, bool is_moved)
|
||||||
{
|
{
|
||||||
qualifier_info is_own = ::eolian_type_is_owned(type) ? qualifier_info::is_own : qualifier_info::is_none;
|
qualifier_info is_own = is_moved ? qualifier_info::is_own : qualifier_info::is_none;
|
||||||
qualifier_info is_const = ::eolian_type_is_const(type) ? qualifier_info::is_const : qualifier_info::is_none;
|
qualifier_info is_const = ::eolian_type_is_const(type) ? qualifier_info::is_const : qualifier_info::is_none;
|
||||||
qualifier_info is_ref = ::eolian_type_is_ptr(type) ? qualifier_info::is_ref : qualifier_info::is_none;
|
qualifier_info is_ref = ::eolian_type_is_ptr(type) ? qualifier_info::is_ref : qualifier_info::is_none;
|
||||||
return is_own | is_const | is_ref;
|
return is_own | is_const | is_ref;
|
||||||
|
|
Loading…
Reference in New Issue