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

Replace BSONElement.fieldName() calls with BSONElement.fieldNameStringData() in dotted_path_support.cpp

    • Type: Icon: Improvement Improvement
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.5
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • v3.4
    • Query 2017-03-27

      Currently we extract field name via fieldName() call, which returns a c-string. With this we lose size information for the field name and have to calculate again when passing to methods that take name as StringData. Calling fieldNameStringData() allows us to avoid duplicated efforts.

      As part of this work, we should also consider removing the BSONElement::fieldName() method entirely.

            Assignee:
            nicholas.zolnierz@mongodb.com Nicholas Zolnierz
            Reporter:
            james.wahlin@mongodb.com James Wahlin
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: