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

XMLWordPrintableJSON

    • Query Optimization
    • Fully Compatible
    • 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 leads to an object copy, even if it the variable is unused.
      /data/mci/22bd5cb6273c9c571686198c9f6023af/bazel_cache/3d8c86e2cd3c28a487a62d019e05fed8/execroot/_main/src/mongo/s/query/planner/cluster_find.cpp:938: AUTO_CAUSES_COPY 174865 Using the "auto" keyword without an "&" causes the copy of an object of type "boost::optional<mongo::NamespaceString>", even if that object is not read.

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

              Created:
              Updated:
              Resolved: