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

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Catalog and Routing
    • 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/catalog/sharding_catalog_client_impl.cpp:1659: AUTO_CAUSES_COPY 175546 Using the "auto" keyword without an "&" causes the copy of an object of type "std::string".
      /data/mci/1d13f9e23b50862fd310b1df4dcad130/bazel_cache/95c775dabb4c264f56421729e4dd2481/execroot/_main/src/mongo/s/catalog/sharding_catalog_client_impl.cpp:1659: AUTO_CAUSES_COPY 175546 The variable "collMatchExpression" 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: