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

Prefer cbegin() and crbegin() on Pipeline::getSources()

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Query Execution
    • QE 2025-05-12
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None

      Currently, the Pipeline class offers both const and non-const getSources() methods. We want to minimize the number of non-const calls, and ideally, remove the non-const getSources().

      Currently, there are 30 getSources().begin() calls and 13 getSources().rbegin() calls. Replacing some of them with cbegin() and crbegin() will clearly indicate where non-constedness is still intentionally required.

      This minor improvement is related to SPM-4106, but it is out of scope of the project.

            Assignee:
            niels.lohmann@mongodb.com Niels Lohmann
            Reporter:
            romans.kasperovics@mongodb.com Romans Kasperovics
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: