canonicalizeName and its wrapper functions in in mongo_gssapi.cpp accept a std::string* as an out-parameter which they populate with a canonical name. These functions return a Status to indicate whether canonicalization was successful. Out-parameters aren't preferred in our codebase, because they aren't clear. Instead, we should modify the functions to return StatusWith<std::string>, which represents either a std::string, or a Status object containing an error. This style is more clear as to the intent of the returned string, and is assumed to have equivalent performance.
Make canonicalizeName and wrapper functions return StatusWith
- Assignee:
-
Erwin Pe
- Reporter:
-
Spencer Jackson
- Votes:
-
0 Vote for this issue - Watchers:
-
2 Start watching this issue
- Created:
- Updated:
- Resolved: