Re: basegfx::fround and friends seems needed in windows build
Hi there, On Sun, 2012-02-12 at 12:45 +0700, Korrawit Pruegsanusak wrote: > >> > So there are some alternatives options to hide something from > >> > callcatcher. [...] write unit tests that call it [...] > > Could you please give me a hint how to do this? Thanks :-) Sure ! :-) so we want to keep: +BASEGFX_DLLPUBLIC B2IRange fround(const B2DRange& rRange); around [sic.] ;-) The basegfx/CppunitTest makefile points to the code that is used for unit testing. I suggest we add a method to test/basegfx2d.cxx that has an equivalent: CPPUNIT_TEST(rotate); that does some trivial operation on that method, and checks the results :-) that will ensure the method is called at least from somewhere & calm down the unusedcode checker [ we can remove it from the list then ]. Does that make sense ? Thanks ! :-) Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/12/2012 06:45 AM, Korrawit Pruegsanusak wrote: On Thu, Feb 9, 2012 at 17:39, Michael Meeks wrote: On Wed, 2012-02-08 at 21:36 +0100, Stephan Bergmann wrote: On 02/08/2012 09:30 PM, Caolán McNamara wrote: So there are some alternatives options to hide something from callcatcher. [...] write unit tests that call it [...] I somehow like that solution best. :) Ditto :-) Could you please give me a hint how to do this? Thanks :-) Module basegfx already has some unit tests in basegfx/test/, run via basegfx/CppunitTest_basegfx.mk (cd basegfx && make check). Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
Hello Michael, all, On Thu, Feb 9, 2012 at 17:39, Michael Meeks wrote: > On Wed, 2012-02-08 at 21:36 +0100, Stephan Bergmann wrote: >> On 02/08/2012 09:30 PM, Caolán McNamara wrote: >> > So there are some alternatives options to hide something from >> > callcatcher. [...] write unit tests that call it [...] >> >> I somehow like that solution best. :) > > Ditto :-) Could you please give me a hint how to do this? Thanks :-) Best Regards, -- Korrawit Pruegsanusak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On Wed, 2012-02-08 at 21:36 +0100, Stephan Bergmann wrote: > On 02/08/2012 09:30 PM, Caolán McNamara wrote: > > So there are some alternatives options to hide something from > > callcatcher. [...] write unit tests that call it [...] > > I somehow like that solution best. :) Ditto :-) Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/08/2012 09:30 PM, Caolán McNamara wrote: So there are some alternatives options to hide something from callcatcher. [...] write unit tests that call it [...] I somehow like that solution best. :) Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On Wed, 2012-02-08 at 20:33 +0100, Stephan Bergmann wrote: > I guess one can argue both ways here. A feature-complete basegfx > library where some features happen to only be used in certain scenarios, > but the library itself clean of scenario-differentiating ifdef hacks vs. > "micro-level configuration management." If an inline is unused it doesn't appear, seeing as gcc doesn't generate code for unused inlines. And if something is only used by a cppunit test then it doesn't appear either seeing as calls to the code are generated ;-) So there are some alternatives options to hide something from callcatcher. Remove it, ifdef it out, convert it to an inline, write unit tests that call it, add it to the sed line that differentiates unusedcode.all from unusedcode.easy C. ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/08/2012 06:31 PM, Michael Meeks wrote: And of course, it'd be good to add some #ifndef UNX stuff around that I suppose, so it is not compiled and doesn't re-appear on the unusedcode.easy list in future :-) I guess one can argue both ways here. A feature-complete basegfx library where some features happen to only be used in certain scenarios, but the library itself clean of scenario-differentiating ifdef hacks vs. "micro-level configuration management." (Though the latter has the benefit of better suiting the unusedcode tool, of course.) Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On Wed, 2012-02-08 at 21:22 +0700, Korrawit Pruegsanusak wrote: > On Wed, Feb 8, 2012 at 17:11, Stephan Bergmann wrote: > > Yes, please just revert what is used by Windows-only canvas/source/directx > > but got erroneously removed. > > Thanks! Done at > http://cgit.freedesktop.org/libreoffice/core/commit/?id=a330f38093e2643a26239557050561afae9ff23d And of course, it'd be good to add some #ifndef UNX stuff around that I suppose, so it is not compiled and doesn't re-appear on the unusedcode.easy list in future :-) Thanks ! Michael. -- michael.me...@suse.com <><, Pseudo Engineer, itinerant idiot ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
Hello Stephan, On Wed, Feb 8, 2012 at 17:11, Stephan Bergmann wrote: > Yes, please just revert what is used by Windows-only canvas/source/directx > but got erroneously removed. Thanks! Done at http://cgit.freedesktop.org/libreoffice/core/commit/?id=a330f38093e2643a26239557050561afae9ff23d Anyway, I don't have a directx sdk to test it, so I just revert only errors mentioned in tinderbox. Let's see if we need more ... :-) Best Regards, -- Korrawit Pruegsanusak ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: basegfx::fround and friends seems needed in windows build
On 02/08/2012 10:30 AM, Korrawit Pruegsanusak wrote: What should we do next? (partially) revert it? or ...? :-) Yes, please just revert what is used by Windows-only canvas/source/directx but got erroneously removed. Stephan ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice