[SERVER-68990] Coverity analysis defect 122831: AUTO_CAUSES_COPY Created: 19/Aug/22  Updated: 27/Oct/23  Resolved: 12/Oct/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Minor - P4
Reporter: Coverity Collector User Assignee: Sebastien Mendez
Resolution: Gone away Votes: 0
Labels: coverity, neweng
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-08-19 at 11.02.36 AM.png     PNG File Screen Shot 2022-08-19 at 11.06.09 AM.png    
Sprint: QE 2022-10-17
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/exec/sbe/util/stage_results_printer.cpp:61: AUTO_CAUSES_COPY 122831 Using the "auto" keyword without an "&" causes the copy of an object of type pair.



 Comments   
Comment by Sebastien Mendez [ 12/Oct/22 ]

This was already fixed by SERVER-69581

Comment by Kyle Suarez [ 19/Aug/22 ]

Multiple AUTO_CAUSES_COPY violations were reported so whoever takes this task, please just sweep through the whole file.

Generated at Thu Feb 08 06:12:18 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.