improving empty handling in tools::Rectangle
Luboš Luňák
l.lunak at collabora.com
Wed May 8 08:31:21 UTC 2019
On Tuesday 07 of May 2019, Tomaž Vajngerl wrote:
> Hi,
>
> On Tue, May 7, 2019 at 8:42 PM Luboš Luňák <l.lunak at collabora.com> wrote:
> > A clang plugin that rewrites all "getWidth()" to "(GetWidth() + 1)" (or
> > the
> > other way around).
>
> Well the problem is that getWidth() is not always GetWidth() + 1 , which
> you see when you examine its implementation. AFAIK this is the reason
> previous attempts abandoned the idea to mechanically change it.
I see. One idea that comes to mind then is to split the current class into a
sane tools::Rectangle and keep the insane stuff in tools::SillyRectangle.
Then at least it would be clearly defined what is good and what is not, the
awfulness would be contained, wouldn't spread and its usage could be reduced
over time.
--
Luboš Luňák
l.lunak at collabora.com
More information about the LibreOffice
mailing list