LO building fails with non debug mode on slideshow/source/engine/box2dtools.cxx (loplugin:staticmethods)
Julien Nabet
serval2412 at yahoo.fr
Sun Aug 16 16:55:41 UTC 2020
Hello Sarper and Thorsten,
On pc Debian x86-64 with master sources updated today with non debug
build, I got these building errors:
In file included from
/home/julien/lo/libo_perf/slideshow/source/engine/box2dtools.cxx:10:
/home/julien/lo/libo_perf/slideshow/source/inc/box2dtools.hxx:212:24:
error: this member function can be declared static [loplugin:staticmethods]
Box2DBodySharedPtr makeBodyDynamic(const Box2DBodySharedPtr&
pBox2DBody);
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/julien/lo/libo_perf/slideshow/source/engine/box2dtools.cxx:370:32:
note: defined here: [loplugin:staticmethods]
Box2DBodySharedPtr box2DWorld::makeBodyDynamic(const Box2DBodySharedPtr&
pBox2DBody)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from
/home/julien/lo/libo_perf/slideshow/source/engine/box2dtools.cxx:10:
/home/julien/lo/libo_perf/slideshow/source/inc/box2dtools.hxx:230:24:
error: this member function can be declared static [loplugin:staticmethods]
Box2DBodySharedPtr makeBodyStatic(const Box2DBodySharedPtr&
pBox2DBody);
~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/julien/lo/libo_perf/slideshow/source/engine/box2dtools.cxx:387:32:
note: defined here: [loplugin:staticmethods]
Box2DBodySharedPtr box2DWorld::makeBodyStatic(const Box2DBodySharedPtr&
pBox2DBody)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
I don't reproduce this with my build containing enable-dbgutil because
the functions contain:
assert(mpBox2DWorld);
For the rest, they can indeed be static, see
https://opengrok.libreoffice.org/xref/core/slideshow/source/engine/box2dtools.cxx?r=28022cee&mo=12079&fi=370#370
and
https://opengrok.libreoffice.org/xref/core/slideshow/source/engine/box2dtools.cxx?r=28022cee&mo=12079&fi=387#387
Julien
More information about the LibreOffice
mailing list