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


On Sun, 2012-01-15 at 09:48 +0400, Ivan Timofeev wrote:
AFAIK in arithmetic bools are concerted to int so that true->1 and false->0.
Then, the result is converted back to bool (because the function returns 
bool) so that 0->false and 'any other value'->true.

So "return bool1 - bool2" can be replaced with not-so-magic "return 
bool1 != bool2", right?

By the way, the author of the code is Caolan, let's ask him. :)

I imagine what I would want to happen in the case that two fonts have
the same name, and one has a font version and one doesn't, that the one
that has a font version is sorted in the same order as if it had a font
version greater than the one that doesn't
i.e. return bHaveA > bHaveB;
committed that now and de-booled the comparison operands for some
"clarity".

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.