Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


Hi Bjoern,

First -- thanks for the summary, I got only part of this "big picture"
from your commit messages. :)

One part of your changes is that now SwModify::GetDepends() returns a
const sw::WriterListener*, while it returned a const SwClient* in the
past. We had code that casted away the const-ness using a C style cast:

while( 0 != ( pDep = (SwClient*)aCallMod.GetDepends()) )

(sw/source/core/doc/docfmt.cxx:657)

I'm not sure why loplugin:cstylecast did not catch these earlier, but
now it does:

/home/vmiklos/git/libreoffice/master-clang/sw/source/core/doc/docfmt.cxx:657:26: error: c-style 
cast, type=5, from='const sw::WriterListener *', to='SwClient *', recommendedFix=static_cast 
[loplugin:cstylecast]
    while( 0 != ( pDep = (SwClient*)aCallMod.GetDepends()) )
                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

Additional problem is that SwClient now inherits privately from
::sw::WriterListener, so not even a static_cast + const_cast will make
the compiler happy.

Could do const_cast + reinterpret_cast, but it doesn't sound like the
right fix. What is the correct fix here? ;-)

Thanks,

Miklos

Attachment: signature.asc
Description: Digital signature


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.