-
- Downloads
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
Showing
- src/account.cpp 2 additions, 2 deletionssrc/account.cpp
- src/call.cpp 1 addition, 1 deletionsrc/call.cpp
- src/call.h 1 addition, 1 deletionsrc/call.h
- src/dring/dring.h 1 addition, 1 deletionsrc/dring/dring.h
- src/manager.cpp 2 additions, 2 deletionssrc/manager.cpp
- src/manager.h 2 additions, 2 deletionssrc/manager.h
- src/media/audio/ringbufferpool.cpp 2 additions, 2 deletionssrc/media/audio/ringbufferpool.cpp
- src/media/audio/ringbufferpool.h 2 additions, 2 deletionssrc/media/audio/ringbufferpool.h
- src/media/video/sinkclient.cpp 1 addition, 1 deletionsrc/media/video/sinkclient.cpp
- src/media/video/sinkclient.h 1 addition, 1 deletionsrc/media/video/sinkclient.h
- src/media/video/video_base.h 1 addition, 1 deletionsrc/media/video/video_base.h
- src/media/video/video_mixer.cpp 1 addition, 1 deletionsrc/media/video/video_mixer.cpp
- src/media/video/video_mixer.h 1 addition, 1 deletionsrc/media/video/video_mixer.h
- src/media/video/video_sender.cpp 1 addition, 1 deletionsrc/media/video/video_sender.cpp
- src/media/video/video_sender.h 1 addition, 1 deletionsrc/media/video/video_sender.h
- src/ringdht/namedirectory.cpp 6 additions, 6 deletionssrc/ringdht/namedirectory.cpp
- src/ringdht/ringaccount.cpp 9 additions, 9 deletionssrc/ringdht/ringaccount.cpp
- src/ringdht/ringaccount.h 4 additions, 4 deletionssrc/ringdht/ringaccount.h
- src/security/certstore.cpp 3 additions, 3 deletionssrc/security/certstore.cpp
- src/security/certstore.h 2 additions, 2 deletionssrc/security/certstore.h
Loading
Please register or sign in to comment