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

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Optimization
    • 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/1d13f9e23b50862fd310b1df4dcad130/bazel_cache/95c775dabb4c264f56421729e4dd2481/execroot/_main/src/mongo/s/query/planner/cluster_aggregate.cpp:667: AUTO_CAUSES_COPY 175543 Using the "auto" keyword without an "&" causes the copy of an object of type "boost::optional<mongo::CollectionRoutingInfo>".
      /data/mci/1d13f9e23b50862fd310b1df4dcad130/bazel_cache/95c775dabb4c264f56421729e4dd2481/execroot/_main/src/mongo/s/query/planner/cluster_aggregate.cpp:667: AUTO_CAUSES_COPY 175543 The variable "cri" 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: