[fpc-devel] Types.IntersectRect(), probably bug or misusage VERY URGENT
Luiz Americo Pereira Camara
luizmed at oi.com.br
Tue Oct 26 23:55:03 CEST 2010
zeljko at holobit.net escreveu:
> Quoting Luiz Americo Pereira Camara <luizmed at oi.com.br>:
>
>> Mattias Gaertner escreveu:
>>> On Tue, 26 Oct 2010 17:31:48 +0200
>>> zeljko <zeljko at holobit.net> wrote:
>>>
>>>
>>>> One note: IntersectRect in lazarus worked OK until we decided to
>>>> use Types.IntersectRect, old implementation from GraphType looks
>>>> much better than current fpc one.
>>>
>>> Then it is probably better to undo the change.
>>> Should I do that?
>>>
>> In the same program you can have IntersectRect with different behavior
>> just if you switch the uses order LCLIntf <> Types
>
> This is mainly why I don't won't undo IntersectRect() to laz
> one.Better to propose good patch for Types.IntersectRect().
Since the fixed Types.IntersectRect won't ship with fpc242 anyway the
potential for problems will exist.
In the case the LCL version is kept removed, an user code misusing
IntersectRect may break since will start to uses the Types version.
In the case the LCL version is restored there's the already cited
problem of mixing both.
There's two options IMO if LCL version is removed:
- Fix Types.IntersectRect in 242
- Document the misuse behavior so the user can be warned (my preferred).
Luiz
More information about the fpc-devel
mailing list