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


On Wed, 2013-02-13 at 12:16 -0200, Rodolfo wrote:
While working on a patch, I saw this #define inside a .cxx file... [1]

Some (private) methods of class Ruler are declared inside an #ifdef of
it [2]. But that can be only triggered inside ruler.cxx file [1] : a
trick by defining _SV_RULER_CXX right before including the header
file.

Is it really necessary? Shouldn't SVT_DLLPRIVATE do this
completely-"private"-thing?

Those hacky defines precede by a very long time all the visibility
markup. Anyway the ifdef hackery is orthogonal to the actual visibility
of those symbols (surely anyway). I don't know why that sort of stuff
exists, but it only exists in the oldest of code and it's as if there
was no public/private support in someones compiler :-) 

My best theory is that it was intended to speed up builds by having less
"stuff" in the headers for compilers to parse by having the preprocessor
strip out the stuff includers didn't need to see. Which would suggest
that it will only be found around private methods, i.e. not
protected/public methods or anything that takes up space.

So, IMO it's not necessary and feel free to remove it.

C.


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.