Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-90471

Coverity analysis defect 155589: COPY_INSTEAD_OF_MOVE

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Atlas Streams
    • Fully Compatible
    • ALL
    • Sprint 50, Sprint 51, Sprint 52, Sprint 53, Sprint 54

      COPY_INSTEAD_OF_MOVE

      Unnecessary object copies can affect performance. Creating a copy of a variable that is no longer used instead of using std::move().
      /src/mongo/db/modules/enterprise/src/streams/exec/planner.cpp:1458: COPY_INSTEAD_OF_MOVE 155589 "spec" is passed-by-value as parameter to "operator ()" when it could be moved instead.
      /src/mongo/db/exec/document_value/document.h:137: COPY_INSTEAD_OF_MOVE 155589 Type "mongo::Document" is move-constructible.

            Assignee:
            sandeep.dhoot@mongodb.com Sandeep Dhoot
            Reporter:
            xgen-internal-coverity Coverity Collector User
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: