Skip to content
Snippets Groups Projects
Commit 66140094 authored by Guillaume Roguez's avatar Guillaume Roguez
Browse files

fix bad usage of shared_ptr as function argument

Many function/method pass shared_ptr by copy and not by (const) reference.
As explained here [1], if the smast pointer is not supposed to be modified
and used as an output argument, it's a bad usage as we cause
an uneeded copy. As this copy causes a memory lock this lead to CPU
and memory cache lock bad usage.

This patch converts all these by-value into by-const-reference
on all shared_ptr arguments over the daemon sources.

[1] https://herbsutter.com/2013/06/05/gotw-91-solution-smart-pointer-parameters/

Change-Id: Ic1e68d93a6917f5e2865b6818b7c1210ff98b1a8
parent 490ed632
No related branches found
No related tags found
No related merge requests found
Showing
with 44 additions and 44 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment