Coverity analysis defect 175520: 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/7b5199136d945ea4e1751b7b3bd3d384/bazel_cache/658afbbc91b088dd7e554f8eea998579/execroot/_main/src/mongo/db/query/query_planner_params.cpp:339: AUTO_CAUSES_COPY 175520 This lambda has an unspecified return type. This implies "auto" and causes the copy of an object of type "std::vector<mongo::IndexHint, std::allocator<mongo::IndexHint> >".
      /data/mci/7b5199136d945ea4e1751b7b3bd3d384/bazel_cache/658afbbc91b088dd7e554f8eea998579/execroot/_main/src/mongo/db/query/query_planner_params.cpp:364: AUTO_CAUSES_COPY 175520 This return statement creates a copy.

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

              Created:
              Updated: