Coverity analysis defect 175517: 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 without an & causes a copy.
      /data/mci/7b5199136d945ea4e1751b7b3bd3d384/bazel_cache/658afbbc91b088dd7e554f8eea998579/execroot/_main/src/mongo/db/matcher/schema/json_schema_parser.cpp:1637: AUTO_CAUSES_COPY 175517 Using the "auto" keyword without an "&" causes the copy of an object of type "boost::optional<mongo::BSONTypeSet>".
      /data/mci/7b5199136d945ea4e1751b7b3bd3d384/bazel_cache/658afbbc91b088dd7e554f8eea998579/execroot/_main/src/mongo/db/matcher/schema/json_schema_parser.cpp:1637: AUTO_CAUSES_COPY 175517 The variable "infoType" has a non-"const" type, however its value is never changed.

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

                Created:
                Updated:
                Resolved: