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

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Won't Fix
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Cluster Scalability
    • ALL
    • ClusterScalability Jul7-Jul20
    • 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/22bd5cb6273c9c571686198c9f6023af/bazel_cache/3d8c86e2cd3c28a487a62d019e05fed8/execroot/_main/src/mongo/db/s/auto_split_vector.cpp:211: AUTO_CAUSES_COPY 174790 Using the "auto" keyword without an "&" causes the copy of an object of type "std::unique_ptr<mongo::PlanExecutor, mongo::PlanExecutor::Deleter>".
      /data/mci/22bd5cb6273c9c571686198c9f6023af/bazel_cache/3d8c86e2cd3c28a487a62d019e05fed8/execroot/_main/src/mongo/db/s/auto_split_vector.cpp:211: AUTO_CAUSES_COPY 174790 The variable "rangeEndIdxScanner" has a non-"const" type, however its value is never changed.

            Assignee:
            Brett Nawrocki
            Reporter:
            Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: