Closed lewie-donckers closed 2 years ago
Google style guide (and cpplint) used to recommend output parameters to be pointer so that you can see an argument is modified:
foo(x, y); // x and y won't be mutated
bar(x, &y); // y may be mutated
But I can't find it in the style guide anymore, is this rule outdated? https://google.github.io/styleguide/cppguide.html#Inputs_and_Outputs
But I can't find it in the style guide anymore, is this rule outdated?
I hope so. ;-D
Refactored a mandatory (nullptr is not allowed) pointer parameter to a reference.
See: