[webkit-dev] Do we have a style preference about const member functions?

Peter Kasting pkasting at google.com
Thu Jun 9 11:13:35 PDT 2011

On Thu, Jun 9, 2011 at 2:49 AM, Maciej Stachowiak <mjs at apple.com> wrote:
> I'm not really convinced that casting away const from a return value is
> intrinsically safer than casting away const from "this".

Allowing the caller to mutate the return value is fine because the caller
had a non-const |this| to begin with.  We're not making anything less
const-safe.  Casting away const on |this|, OTOH, allows you to mutate
objects even when you never had permission to begin with.  Much different.

In any case, my intent is to proceed as Darin and I discussed.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20110609/d60c309c/attachment.html>

More information about the webkit-dev mailing list