Re: error detected by loplugin:staticaccess

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hallo Mike, hallo Caolán,

thank you for helping me.

Kind regards
Regina

Mike Kaganski schrieb am 25-Oct-20 um 17:03:
Hi Regina,

On 25.10.2020 17:12, Regina Henschel wrote:
Hi all,

I got an error in https://gerrit.libreoffice.org/c/core/+/104643
But I do not know, how to write it correctly. Can you please help me?
The other compilers are fine, with the way I have written it.

Since GetObjData is a static method, it does not belong to an object, but to the class. So writing pDrawLayer->GetObjData(aObj) (which looks as if GetObjData was operating on pDrawLayer) is conceptually wrong, and [loplugin:staticaccess] suggests you to we-write it as

     ScDrawObjData* pData = ScDrawLayer::GetObjData(aObj);

instead.


_______________________________________________
LibreOffice mailing list
LibreOffice@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/libreoffice




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux