scary / too subtle overload

Tor Lillqvist tml at iki.fi
Fri Oct 5 12:35:58 UTC 2018


> > Function overload based on different integer types, one virtual, the
>
>
Sadly, our code is full of using the same member function names over and
over, with different semantics, using the number and types of parameters to
differentiate. Another example: OutputDevice::SetLineColor() and
OutputDevice::SetLineColor( const Color& rColor ) where the first case
actually means "set NO line color (transparent)". Obviously (sarcasm)
calling it "SetTransparentLineColor" or "SetNoLineColor" would have been
too obvious.

--tml
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20181005/6fd46f35/attachment.html>


More information about the LibreOffice mailing list