[webkit-dev] Change to style guideline: should use type& instead of type* for out arguments
Ryosuke Niwa
rniwa at webkit.org
Tue Oct 4 20:10:49 PDT 2011
On Tue, Oct 4, 2011 at 2:14 PM, James Robinson <jamesr at google.com> wrote:
>
> Is it to document the nullity of the out-param?
>
Yes, and it also prevents mistakes like:
#include <cstdio>
class base { ... };
class derived : public base { ... };
void getBase(base* b) { *b = base(); }
int main() {
derived d;
getBase(&d);
return 0;
}
- Ryosuke
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20111004/46c48265/attachment.html>
More information about the webkit-dev
mailing list