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

Consider calling getOwned for object_owned idl type

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Backlog
    • Major - P3
    • Resolution: Unresolved
    • None
    • None
    • None
    • Service Arch

    Description

      when generating the constructor.

      Example:
      https://github.com/mongodb/mongo/blob/eac5afb151fc64740763316c128a46c8c664d37e/src/mongo/db/s/config/set_cluster_parameter_coordinator_document.idl#L58

      Generates code looks like this:

      SetClusterParameterCoordinatorDocument::SetClusterParameterCoordinatorDocument(mongo::BSONObj parameter) : _parameter(std::move(parameter)), _hasParameter(true) {
          // Used for initialization only
      }
      

      Instead of

      _parameter(std::move(parameter))
      

      consider doing this instead:

      _parameter(parameter.getOwned())
      

      Attachments

        Issue Links

          Activity

            People

              backlog-server-servicearch Backlog - Service Architecture
              randolph@mongodb.com Randolph Tan
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated: