[webkit-dev] On returning mutable pointers from const methods

Peter Kasting pkasting at google.com
Thu Oct 25 13:02:08 PDT 2012


On Thu, Oct 25, 2012 at 3:48 AM, Andreas Kling <kling at webkit.org> wrote:

> So, I propose that we allow only these two signature formats for raw
> pointers:
>
> - const Foo* foo() const;
> - Foo* foo();
>

This was part of a discussion I had on this list (IIRC) a while back.  The
context was the larger issue of const-correctness in general, but my memory
says that this principle didn't cause too much disagreement.

There are an enormous number of violations of it in the existing codebase,
some of which are quite tricky to fix properly.  I think I landed a few
cleanups to Node or some other such core class related to this before going
off to work on other stuff.

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20121025/7aa60a94/attachment.html>


More information about the webkit-dev mailing list