Skip to content

Remove an unnecessary loop

Created by: nthykier

The unprotected_ids function returns all unprotected ids and removeUnreferencedIDs removes all of them that does not appear in the return value of findReferencedElements.

On closer observation it turns out that removeUnreferencedIDs cannot cause nodes/IDs to become unprotected nor unreferenced (as it only remove the "id" attribute, not the node). With this in mind, we can just remove the loop and save a call to all of these functions.

Signed-off-by: Niels Thykier niels@thykier.net

Merge request reports

Loading