DRAFT document on coding conventions in kde libraries
Allan Sandfeld Jensen
kde at carewolf.com
Sun Mar 5 23:33:38 GMT 2006
On Sunday 05 March 2006 19:25, Frans Englich wrote:
>
> * Mention that people should avoid C style casts. Especially in headers but
> also in implementation. From my knowledge: C++ style casts are stricter and
> therefore gives the compiler better options for statically detecting
> errors, and in some cases invalid casts are generated by C-style casts.
>
I do not agree. I think it is more important to warn against dynamic_cast<>
and recommend qobject_cast<> or static_cast<>/C style casts instead.
`Allan
More information about the kde-core-devel
mailing list