[PATCH 4/4] XML writer: do not create extra temporary referenced type shared_ptr

Dodji Seketeli dodji@seketeli.org
Fri Feb 25 09:52:44 GMT 2022


Giuliano Procida <gprocida@google.com> a écrit:

> In the loop of write_referenced_types temporary shared_ptr objects are
> created. In the case of a declaration, two shared_ptrs are created. It
> is possible to code this so only one object is created.
>
> This is a small optimisation with no change to tests or behaviour.
>
> 	* src/abg-writer.cc (write_referenced_types): Create temporary
> 	shared_ptr objects within each conditional branch instead of
> 	outside the conditionals and within one of the branches.
>
> Reviewed-by: Matthias Maennich <maennich@google.com>
> Signed-off-by: Giuliano Procida <gprocida@google.com>

Applied to master, thanks!

[...]

Cheers,

-- 
		Dodji


More information about the Libabigail mailing list