summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/eolian_cxx/grammar/klass_def.hpp8
-rw-r--r--src/lib/eolian_cxx/grammar/qualifier_def.hpp4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/eolian_cxx/grammar/klass_def.hpp b/src/lib/eolian_cxx/grammar/klass_def.hpp
index 47afbfedb8..fbd8779e0f 100644
--- a/src/lib/eolian_cxx/grammar/klass_def.hpp
+++ b/src/lib/eolian_cxx/grammar/klass_def.hpp
@@ -452,7 +452,7 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
452 switch( ::eolian_type_type_get(eolian_type)) 452 switch( ::eolian_type_type_get(eolian_type))
453 { 453 {
454 case EOLIAN_TYPE_VOID: 454 case EOLIAN_TYPE_VOID:
455 original_type = attributes::regular_type_def{"void", {qualifiers(eolian_type), {}}, {}}; 455 original_type = attributes::regular_type_def{"void", {qualifiers(eolian_type, is_moved), {}}, {}};
456 break; 456 break;
457 case EOLIAN_TYPE_REGULAR: 457 case EOLIAN_TYPE_REGULAR:
458 if (!stp) 458 if (!stp)
@@ -474,12 +474,12 @@ inline void type_def::set(Eolian_Type const* eolian_type, Eolian_Unit const* uni
474 for(efl::eina::iterator<const char> namespace_iterator( ::eolian_type_namespaces_get(eolian_type)) 474 for(efl::eina::iterator<const char> namespace_iterator( ::eolian_type_namespaces_get(eolian_type))
475 , namespace_last; namespace_iterator != namespace_last; ++namespace_iterator) 475 , namespace_last; namespace_iterator != namespace_last; ++namespace_iterator)
476 namespaces.push_back(&*namespace_iterator); 476 namespaces.push_back(&*namespace_iterator);
477 original_type = {regular_type_def{ ::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type), {}}, namespaces, type_type, is_undefined}}; 477 original_type = {regular_type_def{ ::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved), {}}, namespaces, type_type, is_undefined}};
478 } 478 }
479 else 479 else
480 { 480 {
481 complex_type_def complex 481 complex_type_def complex
482 {{::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type), {}}, {}}, {}}; 482 {{::eolian_type_short_name_get(eolian_type), {qualifiers(eolian_type, is_moved), {}}, {}}, {}};
483 while (stp) 483 while (stp)
484 { 484 {
485 complex.subtypes.push_back({stp, unit, EOLIAN_C_TYPE_DEFAULT, eolian_type_is_move(stp)}); 485 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
491 case EOLIAN_TYPE_CLASS: 491 case EOLIAN_TYPE_CLASS:
492 { 492 {
493 Eolian_Class const* klass = eolian_type_class_get(eolian_type); 493 Eolian_Class const* klass = eolian_type_class_get(eolian_type);
494 original_type = klass_name(klass, {qualifiers(eolian_type), {}}); 494 original_type = klass_name(klass, {qualifiers(eolian_type, is_moved), {}});
495 } 495 }
496 break; 496 break;
497 default: 497 default:
diff --git a/src/lib/eolian_cxx/grammar/qualifier_def.hpp b/src/lib/eolian_cxx/grammar/qualifier_def.hpp
index 33e3ed5125..cab3ca8667 100644
--- a/src/lib/eolian_cxx/grammar/qualifier_def.hpp
+++ b/src/lib/eolian_cxx/grammar/qualifier_def.hpp
@@ -72,9 +72,9 @@ inline qualifier_bool operator^(qualifier_bool lhs, qualifier_info rhs)
72 return lhs; 72 return lhs;
73} 73}
74 74
75inline qualifier_info qualifiers(Eolian_Type const* type) 75inline qualifier_info qualifiers(Eolian_Type const* type, bool is_moved)
76{ 76{
77 qualifier_info is_own = ::eolian_type_is_owned(type) ? qualifier_info::is_own : qualifier_info::is_none; 77 qualifier_info is_own = is_moved ? qualifier_info::is_own : qualifier_info::is_none;
78 qualifier_info is_const = ::eolian_type_is_const(type) ? qualifier_info::is_const : qualifier_info::is_none; 78 qualifier_info is_const = ::eolian_type_is_const(type) ? qualifier_info::is_const : qualifier_info::is_none;
79 qualifier_info is_ref = ::eolian_type_is_ptr(type) ? qualifier_info::is_ref : qualifier_info::is_none; 79 qualifier_info is_ref = ::eolian_type_is_ptr(type) ? qualifier_info::is_ref : qualifier_info::is_none;
80 return is_own | is_const | is_ref; 80 return is_own | is_const | is_ref;