forked from enlightenment/efl
csharp: Simplify field_argument_assignment
Summary: Avoid extra generator calls. Reviewers: jptiz Reviewed By: jptiz Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D10774
This commit is contained in:
parent
6b04e5f215
commit
dfae8c5185
|
@ -45,8 +45,9 @@ struct field_argument_assignment_generator
|
||||||
template<typename OutputIterator, typename Context>
|
template<typename OutputIterator, typename Context>
|
||||||
bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
|
bool generate(OutputIterator sink, attributes::struct_field_def const& field, Context const& context) const
|
||||||
{
|
{
|
||||||
if (!as_generator("this." << string << " = " << string)
|
auto field_name = name_helpers::to_field_name(field.name);
|
||||||
.generate(sink, std::make_tuple(name_helpers::to_field_name(field.name), name_helpers::to_field_name(field.name)), context))
|
if (!as_generator("this." << field_name << " = " << field_name)
|
||||||
|
.generate(sink, attributes::unused, context))
|
||||||
return false;
|
return false;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue