Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-28 Thread Jan Holesovsky
Hi, On 2010-06-24 at 21:30 +0200, Eike Rathke wrote: Anyway the change from BOOL to whatever is nothing that can be done just with a script. That's different for e.g. USHORT. Just a quick idea: define BOOL (or FASTBOOL) as some class that has private ctors, conversion, assignment, bit

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-25 Thread Stephan Bergmann
On 06/24/10 22:51, Terrence Enger wrote: This is about a sal_Bool rather than a bool, but I shall raise the question anyway. It just happens that I was running OO under gdb, and the following output had already caught my attention. Breakpoint 1, connectivity::OSkipDeletedSet::moveAbsolute

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-25 Thread 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

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-25 Thread Herbert Duerr
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

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-25 Thread Carsten Driesner
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

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-25 Thread Mathias Bauer
On 06/25/2010 10:48 AM, Herbert Duerr wrote: 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

[dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Bartosz
Hi. What do you think about replace macro FASTBOOL with bool? http://svn.services.openoffice.org/opengrok/xref/DEV300_m83/tools/inc/tools/solar.h#FASTBOOL For now the FASTBOOL is defined as: typedef int FASTBOOL; Maybe we should change it to (or remove this macro): typedef

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Stephan Bergmann
On 06/24/10 11:17, Bartosz wrote: Maybe we should change it to (or remove this macro): typedef bool FASTBOOL; Yes, best would certainly be to remove the typedef and change occurrences of FASTBOOL to plain bool (watching out for potential misuses that tunnel values other

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Malte Timmermann
+1 for removing this ancient thing. Not for memory reasons (I doubt it would really make a difference), but for code cleanup reasons. I don't know how risky this is when it comes to the binfilter module. If the old binary filters simply stream FASTBOOL variables, the document format would

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Mathias Bauer
Hi, On 24.06.2010 11:17, Bartosz wrote: Hi. What do you think about replace macro FASTBOOL with bool? http://svn.services.openoffice.org/opengrok/xref/DEV300_m83/tools/inc/tools/solar.h#FASTBOOL For now the FASTBOOL is defined as: typedef int FASTBOOL; Maybe we should

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Niklas Nebel
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

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Bartosz
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? I agree with you Niklas. It will be much better/safer to

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Niklas Nebel
On 06/24/10 13:07, Bartosz wrote: 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? I agree with you Niklas.

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Niklas Nebel
On 06/24/10 13:52, Stephan Bergmann wrote: Re memory usage: BOOL[n] and bool[n] would each be n bytes in size, or what am I missing? You're right, forget about that part. Re mixed use with sal_Bool: haven't encountered this problem often over the last years (and I liberally use bool instead

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Mathias Bauer
On 24.06.2010 12:42, 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

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Eike Rathke
Hi, On Thursday, 2010-06-24 14:44:35 +0200, Mathias Bauer wrote: In result I expect that most BOOL can be replaced by bool, while some of them will become sal_Bool. The misused BOOLS that in fact are 8 Bit integer variables(*) IMHO should become a sal_uInt8/16 just to show that they

Re: [dev] FASTBOOL macro vs bool - decrease memory usage

2010-06-24 Thread Terrence Enger
On Thu, 2010-06-24 at 11:32 +0200, Stephan Bergmann wrote: On 06/24/10 11:17, Bartosz wrote: Maybe we should change it to (or remove this macro): typedef bool FASTBOOL; Yes, best would certainly be to remove the typedef and change occurrences of FASTBOOL to plain