diff options
author | Felipe Magno de Almeida <felipe@expertise.dev> | 2020-06-08 18:32:22 -0300 |
---|---|---|
committer | Marcel Hollerbach <mail@marcel-hollerbach.de> | 2020-06-09 10:29:26 +0200 |
commit | 1c6f38aa74466a7abdff144bf55937d2c90601d4 (patch) | |
tree | fabfaf730eebde624880d02a2c325b1ae41b436b | |
parent | ee092073a3c4ce79c582e4467fcce10e51f4696f (diff) | |
download | efl-1c6f38aa74466a7abdff144bf55937d2c90601d4.tar.gz |
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
-rw-r--r-- | src/bin/eolian_mono/eolian/mono/helpers.hh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/bin/eolian_mono/eolian/mono/helpers.hh b/src/bin/eolian_mono/eolian/mono/helpers.hh index f704ef00af..a13c26a1e8 100644 --- a/src/bin/eolian_mono/eolian/mono/helpers.hh +++ b/src/bin/eolian_mono/eolian/mono/helpers.hh @@ -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) { 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); + constructors.erase (std::remove_if (constructors.begin(), constructors.end(), is_object_parent), constructors.end()); return constructors; } |