On segunda-feira, 30 de abril de 2012 14.53.49, Thiago Macieira wrote:
> On segunda-feira, 30 de abril de 2012 14.14.00, Kent Hansen wrote:
> > Yes, it's late, but it's also one of the final nails in the const char
> > *-based Q(Meta)Object introspection API coffin.
>
> [snip the rest]
>
> Needless to say, I support this change, even though SIC. So here's my
> maintainer stamp of approval for it.
>
> This is much cleaner than the previous implementation.

BTW, I was about to suggest that QMetaMethod be passed by value. My
investigations in "the value of passing by value" show that this class benefits
from it. And it does.

However, there's a catch: most QMetaMethod methods are non-inline. In order to
call them, the compiler would need to spill the class to memory anyway. So
there's no gain in passing by value, and it might even be worse because it
needs to use more registers in the function call sequence.

So the recommendation is: keep passing by const-ref.

--
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel Open Source Technology Center
     Intel Sweden AB - Registration Number: 556189-6027
     Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development

Reply via email to