Do not pass strings by value, pass by const ref (&)

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Trivial - P5
    • 2.3.0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Fully Compatible
    • ALL
    • None
    • 3
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      We're pretty good about passing const references to strings instead of passing them by value, avoiding a string copy that serves no purpose. But we're not perfect. In code where the called routine doesn't change its local copy of string arguments, we should always use const&.

              Assignee:
              Tad Marshall
              Reporter:
              Tad Marshall
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: