[SERVER-69200] Coverity analysis defect 123059: AUTO_CAUSES_COPY Created: 26/Aug/22  Updated: 29/Oct/23  Resolved: 06/Sep/22

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

Type: Bug Priority: Major - P3
Reporter: Coverity Collector User Assignee: Adrian Gonzalez Montemayor
Resolution: Fixed Votes: 0
Labels: coverity
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Execution Team 2022-09-19
Participants:

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp:2259: AUTO_CAUSES_COPY 123059 Using the "auto" keyword without an "&" causes the copy of an object of type pair.



 Comments   
Comment by Githook User [ 06/Sep/22 ]

Author:

{'name': 'Adrian Gonzalez', 'email': 'adriangonzalezmontemayor@gmail.com', 'username': 'adriangzz'}

Message: SERVER-69200 Access it by reference to prevent unnecessary copies
Branch: master
https://github.com/mongodb/mongo/commit/b3bf2f67ffbf609523a4c0578bcc5727b3417fd5

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