[SERVER-69778] Coverity analysis defect 133798: AUTO_CAUSES_COPY Created: 16/Sep/22  Updated: 27/Oct/23  Resolved: 08/Dec/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: Misha Tyulenev
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-09-16 at 10.17.27 AM.png    
Sprint: QO 2022-10-03, QE 2022-10-17, QE 2022-10-31, QE 2022-11-14, QE 2022-11-28, QE 2022-12-12
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/query/ce/scalar_histogram.cpp:64: AUTO_CAUSES_COPY 133798 Using the "auto" keyword without an "&" causes the copy of an object of type StatsBucket.


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