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


On Tuesday 07 of May 2019, Noel Grandin wrote:
On 2019/05/07 11:40 AM, Stephan Bergmann wrote:
On 07/05/2019 11:30, Noel Grandin wrote:
(1) split the empty flags into their own bool values.

Is there a reason that information about emptyness needs to be encoded
more explicitly than just via getWidth()==0 and getHeigth()==0?

Yes, depending on which method you call (getWidth() vs GetWidth()), on
tools::Rectangle, it can be regarded as a either a half-open or a closed
range.

Yes, this is truly truly awful, which is why I'm just trying to clean up
one small part of it's awfulness.

 If you're going to already handle the problems, why not handle the awfulness 
by fixing it, instead of patching it up? The class is broken, and it'll be 
broken even after you tweak one consequence of the base problem. If the base 
problem gets fixed, the consequence goes away too.

 The class can't be both, internally it stores just one value, and there are 
functions such as the Size ctor or operator<< that do take a side (although 
in line with the general stupidity, different functions take a different 
side). And while the class gets used extensively, the usage can be fixed 
mechanically.

-- 
 Luboš Luňák
 l.lunak@collabora.com

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.