[SERVER-68995] Coverity analysis defect 123142: AUTO_CAUSES_COPY Created: 19/Aug/22  Updated: 02/Sep/22  Resolved: 02/Sep/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: Ted Tuckman
Resolution: Duplicate Votes: 0
Labels: coverity, neweng, quick-tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File Screen Shot 2022-08-19 at 11.15.18 AM.png    
Issue Links:
Duplicate
duplicates SERVER-68994 Fix AUTO_CAUSES_COPY coverity errors Closed
duplicates SERVER-68999 Coverity analysis defect 123201: AUTO... Closed
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/pipeline/document_source_densify.cpp:155: AUTO_CAUSES_COPY 123142 Using the "auto" keyword without an "&" causes the copy of an object of type StringData.



 Comments   
Comment by Davis Haupt (Inactive) [ 02/Sep/22 ]

Completing this ticket along with SERVER-68999.

Comment by Ana Meza [ 02/Sep/22 ]

Not urgent - but please do if you have time

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