mirrored from https://chromium.googlesource.com/breakpad/breakpad
-
Notifications
You must be signed in to change notification settings - Fork 752
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use std::move with vector insertions
Coverity has started detecting places where variables are inserted into a vector via a copy operation, and then not used anymore. Switch them over to explicit std::move for quick performance improvements. For example: 6405 MinidumpCrashpadInfo::AnnotationObject object = {annotation.type, name, 6406 value_data}; >>> CID 465406: Performance inefficiencies (COPY_INSTEAD_OF_MOVE) >>> "object" is copied and then passed-by-reference as parameter to STL insertion function "std::vector<google_breakpad::MinidumpCrashpadInfo::AnnotationObject, std::allocator<google_breakpad::MinidumpCrashpadInfo::AnnotationObject> >::push_back( std::vector<google_breakpad::MinidumpCrashpadInfo::AnnotationObject, std::allocator<google_breakpad::MinidumpCrashpadInfo::AnnotationObject> >::value_type const &)", when it could be moved instead. 6407 annotations_list->push_back(object); Change-Id: I2d3b3a35296dad84853f4dc6690d64c81c92d582 Reviewed-on: https://chromium-review.googlesource.com/c/breakpad/breakpad/+/6173183 Reviewed-by: Primiano Tucci <[email protected]> Reviewed-by: Lei Zhang <[email protected]>
- Loading branch information
Showing
4 changed files
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters