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




On 2020/03/20 2:12 pm, Luboš Luňák wrote:

With one extra wrinkle: the current tools::Rectangle uses long, and lots of
places that work with tools::Rectangle also use long, which is particularly
pernicious because long is a different bit-size on Windows and Linux.

  Do you know a specific case where that actually matters? My personal position
on integers is "use int, unless you explicitly need something else".



It means that various things that work fine on Linux because of the greater range (and where we do most of our testing) fail in odd ways under Windows, because of under/overflow.

"int" is fine because it is 32-bits on both Linux and Windows - but will start to flush out weird issues which will most likely be revealed by the ASAN buildbots - as happened when I tried to make tools::Rectangle use sal_Int32, we fixed a handful of things and then gave up and rolled back.
see commit 8bc951daf79d

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.