[SERVER-69213] Coverity analysis defect 122709: AUTO_CAUSES_COPY Created: 26/Aug/22  Updated: 29/Oct/23  Resolved: 04/Oct/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: Andrew Witten (Inactive)
Resolution: Fixed Votes: 0
Labels: coverity, neweng, sharding-nyc-subteam2
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:
Story Points: 1

 Description   

AUTO_CAUSES_COPY

Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/src/mongo/client/streamable_replica_set_monitor.cpp:110: AUTO_CAUSES_COPY 122709 Using the "auto" keyword without an "&" causes the copy of an object of type HostAndPort.



 Comments   
Comment by Githook User [ 04/Oct/22 ]

Author:

{'name': 'Andrew Witten', 'email': 'andrew.witten@mongodb.com', 'username': 'awitten1'}

Message: SERVER-69213 remove unused function
Branch: master
https://github.com/mongodb/mongo/commit/fc23374675987d1b8851b2339e3a64c7988d5806

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