summaryrefslogtreecommitdiff
path: root/src/bin
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertise.dev>2020-06-08 18:32:22 -0300
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-06-09 10:29:26 +0200
commit1c6f38aa74466a7abdff144bf55937d2c90601d4 (patch)
treefabfaf730eebde624880d02a2c325b1ae41b436b /src/bin
parentee092073a3c4ce79c582e4467fcce10e51f4696f (diff)
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
Diffstat (limited to 'src/bin')
-rw-r--r--src/bin/eolian_mono/eolian/mono/helpers.hh8
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
407inline std::vector<attributes::constructor_def> reorder_constructors(std::vector<attributes::constructor_def> constructors) 407inline std::vector<attributes::constructor_def> reorder_constructors(std::vector<attributes::constructor_def> constructors)
408{ 408{
409 auto is_required = [](attributes::constructor_def const& ctr) { return !ctr.is_optional; }; 409 auto is_required = [](attributes::constructor_def const& ctr) { return !ctr.is_optional; };
410 auto is_object_parent = [](attributes::constructor_def const& ctr)
411 {
412 return (ctr.klass.namespaces.size() == 1
413 && ctr.klass.namespaces[0] == "Efl"
414 && ctr.klass.eolian_name == "Object"
415 && ctr.name == "Efl.Object.parent");
416 };
410 std::stable_partition(constructors.begin(), constructors.end(), is_required); 417 std::stable_partition(constructors.begin(), constructors.end(), is_required);
418 constructors.erase (std::remove_if (constructors.begin(), constructors.end(), is_object_parent), constructors.end());
411 return constructors; 419 return constructors;
412} 420}
413 421