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

Coverity analysis defect 155583: COPY_INSTEAD_OF_MOVE

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Atlas Streams
    • Fully Compatible
    • ALL
    • Sprint 49

      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:1485: COPY_INSTEAD_OF_MOVE 155583 "windowStageSpec" 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 155583 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:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: