forked from enlightenment/efl
dotnet: Ignore Efl.Object.parent as constructor
In C# we already have Efl.Object.parent as an implicit constructor. Ignore it if it is marked as a constructor. Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11951
This commit is contained in:
parent
ee092073a3
commit
1c6f38aa74
|
@ -407,7 +407,15 @@ inline bool is_unique_event(attributes::event_def const& evt
|
||||||
inline std::vector<attributes::constructor_def> reorder_constructors(std::vector<attributes::constructor_def> constructors)
|
inline std::vector<attributes::constructor_def> reorder_constructors(std::vector<attributes::constructor_def> constructors)
|
||||||
{
|
{
|
||||||
auto is_required = [](attributes::constructor_def const& ctr) { return !ctr.is_optional; };
|
auto is_required = [](attributes::constructor_def const& ctr) { return !ctr.is_optional; };
|
||||||
|
auto is_object_parent = [](attributes::constructor_def const& ctr)
|
||||||
|
{
|
||||||
|
return (ctr.klass.namespaces.size() == 1
|
||||||
|
&& ctr.klass.namespaces[0] == "Efl"
|
||||||
|
&& ctr.klass.eolian_name == "Object"
|
||||||
|
&& ctr.name == "Efl.Object.parent");
|
||||||
|
};
|
||||||
std::stable_partition(constructors.begin(), constructors.end(), is_required);
|
std::stable_partition(constructors.begin(), constructors.end(), is_required);
|
||||||
|
constructors.erase (std::remove_if (constructors.begin(), constructors.end(), is_object_parent), constructors.end());
|
||||||
return constructors;
|
return constructors;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue