Feature #101
closedConversion of pointer parameters into references
0%
Description
This issue corresponds to my previous feature request.
I suggest to convert a parameter like "in", "cap" and "con" from a pointer to a reference.
source:src/client/Client.h@bc32b8f7639eec144404bbc61cb59be5dd1f04a3#L1083
Can such an interface design adjustment be applied on other places in the source code, too?
Updated by Sage Weil almost 14 years ago
- Status changed from New to Rejected
Markus Elfring wrote:
This issue corresponds to my previous feature request.
I suggest to convert a parameter like "in", "cap" and "con" from a pointer to a reference.
source:src/client/Client.h@bc32b8f7639eec144404bbc61cb59be5dd1f04a3#L1083Can such an interface design adjustment be applied on other places in the source code, too?
I'd prefer to leave these as pointers because they are already allocated on the heap and because it makes the pass-by-reference more explicit.
Updated by Markus Elfring almost 14 years ago
... and because it makes the pass-by-reference more explicit.
I find this opinion questionable. I assume that you consider a C coding style interface here instead of C++.
I would like to clarify where null pointers are really valid input parameters for (member) functions.