Use of auto that causes a copy
Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
/data/mci/22bd5cb6273c9c571686198c9f6023af/bazel_cache/3d8c86e2cd3c28a487a62d019e05fed8/execroot/_main/src/mongo/db/mirror_maestro.cpp:260: AUTO_CAUSES_COPY 174811 Using the "auto" keyword without an "&" causes the copy of an object of type "mongo::repl::ReplSetTagConfig".
/data/mci/22bd5cb6273c9c571686198c9f6023af/bazel_cache/3d8c86e2cd3c28a487a62d019e05fed8/execroot/_main/src/mongo/db/mirror_maestro.cpp:260: AUTO_CAUSES_COPY 174811 The variable "tagConfig" has a non-"const" type, however its value is never changed.
- is duplicated by
-
SERVER-107327 Coverity analysis defect 175357: Use of auto that causes a copy
-
- Closed
-