[SERVER-70378] Coverity analysis defect 123395: AUTO_CAUSES_COPY Created: 08/Oct/22  Updated: 29/Oct/23  Resolved: 22/Dec/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Davis Haupt (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity, quick-tech-debt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Assigned Teams:
Query Optimization
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/pipeline/dependencies.cpp:87: AUTO_CAUSES_COPY 123395 Using the "auto" keyword without an "&" causes the copy of an object of type basic_string.



 Comments   
Comment by Githook User [ 22/Dec/22 ]

Author:

{'name': 'Davis Haupt', 'email': 'davis.haupt@mongodb.com', 'username': 'davish'}

Message: SERVER-70378 fix unnecessary copy
Branch: master
https://github.com/mongodb/mongo/commit/0ec86dd696f691fdda3b3f77a1e383e21dd7fe75

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