Coverity analysis defect 175301: Use of auto that causes a copy

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • ALL
    • None
    • 3
    • TBD
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Use of auto that causes a copy

      Unnecessary object copies can affect performance. Using the auto keyword without an & causes a copy.
      /data/mci/385589e166d92c817192496324d07f27/bazel_cache/54fd804a20c0ed84a5084b07abc2f8fa/execroot/_main/src/mongo/db/s/metrics/sharding_data_transform_cumulative_metrics.cpp:289: AUTO_CAUSES_COPY 175301 Using the "auto" keyword without an "&" causes the copy of an object of type "mongo::ShardingDataTransformCumulativeMetrics::MetricsSet".
      /data/mci/385589e166d92c817192496324d07f27/bazel_cache/54fd804a20c0ed84a5084b07abc2f8fa/execroot/_main/src/mongo/db/s/metrics/sharding_data_transform_cumulative_metrics.cpp:289: AUTO_CAUSES_COPY 175301 The variable "set" has a non-"const" type, however its value is never changed.

            Assignee:
            Unassigned
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: