Am 25.06.2010 09:20, schrieb Mathias Bauer:
On 06/24/2010 12:42 PM, Niklas Nebel wrote:
On 06/24/10 12:29, Mathias Bauer wrote:
The idea is so good that someone is already working on it. :-)
There is ongoing work to replace a lot of ancient types like BOOL,
USHORT etc. by sal_... types, with the exception that BOOL/FASTBOOl
will be replaced by bool.
"BOOL -> bool" will cause problems. Memory usage for "new BOOL[n]",
mixed use with sal_Bool (pointers, references), the occasional "special"
value (SfxChildWinInfo::bVisible). Shouldn't we go the safe way and
change BOOL to sal_Bool instead?
Thinking again about suggestion I'm starting to see its merits. It's
not because it's more safe (we should be able to do both changes in
the right way), but it's surely faster.
The primary motivation of us (the framework team) to start that work
was that we wanted to get rid of a possible build breaker that has hit
us every few months in the past.
Types like BOOL, USHORT etc. are not only defined in
tools/inc/tools/solar.h, but also in a Windows header. Moreover, the
Windows API header defines them differently in many cases. So if you
use the tools types, you must avoid to include the "offending" Windows
headers. While that is annoying enough, it becomes a pain if you use
precompiled headers. So it happens at times that a Windows build works
without PCH but breaks with them. I had that several times in the past.
A change from BOOL to sal_Bool indeed would be much faster than an
attempt to use bool as much as possible, so it would be tempting to go
that road and postpone a further replacement of sal_Bool by bool. We
should ask the developers doing the work (some guys from RedOffice)
what their own choice is. I don't know if they are reading this list,
they surely read d...@framework, so I will ask there.
Hi,
Zhangxiaofei wants to exchange BOOL with sal_Bool on the first run. That
exchange was also mentioned in a comment in the solar.h header file. I
also think that this is a much easier way to get the work done and we
can faster get rid of these old clashing types. Later we can do the
transition from sal_Bool to bool.
Regards,
Carsten
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]