-
Notifications
You must be signed in to change notification settings - Fork 34
Use map for attribute lookup in MultiAttribute::check_associated #564
Use map for attribute lookup in MultiAttribute::check_associated #564
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Two minor comments:
- If we can rely on
get_attr_ind_by_namedoing the transform->lower we can ditch it here. - I'm a big fan of reducing indentation and returning early. So I would write it as
if (write_type != Tango::READ_WITH_WRITE && write_type != Tango::READ_WRITE)
{
return;
}
but that is just taste I guess.
7a0c4f1 to
13d04b0
Compare
bourtemb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mliszcz
Just a comment on the origin field in the exceptions thrown, but this was like that before this PR.
I think we could change that.
Except that, this PR looks good to me!
|
@mliszcz Will you do a backports PR? |
|
@t-b sure, I can backport if you want. I don't know what is the policy for backports - do we backport everything that can be backported or just critical bugfixes? Can I assume that I should backport everything that is tagged with "Candidate for backport" maybe? |
I think we can take this convention indeed but we might need to discuss before to put this tag on a PR to decide whether it is worth being backported. In the case of this PR, I would say if it is easy to backport, we can do it but it does not look like a critical bug fix to me, so I would personally not put a high priority on this one. |
|
I'll send a backport PR. It was waiting for a review for more than a year without conflicts. I think I just need to cherry-pick relevant commits and do not expect any conflicts in 9.3-backports. |
To slightly improve remove_attribute performance when multiple writable attributes are configured (fixes #556).