mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-12-16 02:20:30 +01:00
added workaround for x86_64 double 0/x bug
git-svn-id: trunk@9490 -
This commit is contained in:
parent
9d1e35fd96
commit
50e2dbfddb
@ -1,2 +1,2 @@
|
||||
// Created by Svn2RevisionInc
|
||||
const RevisionStr = '9462M';
|
||||
const RevisionStr = '9489M';
|
||||
|
||||
@ -614,8 +614,17 @@ var
|
||||
|
||||
crsScaleChilds:
|
||||
begin
|
||||
{$IFDEF CPU64}
|
||||
{$NOTE remove this workaround, when comiler bug fixed}
|
||||
if Child.MinimumSize[Orientation]=0 then
|
||||
CurScale:=0
|
||||
else
|
||||
CurScale:=double(Child.MinimumSize[Orientation])
|
||||
/Child.PreferredSize[Orientation];
|
||||
{$ELSE}
|
||||
CurScale:=double(Child.MinimumSize[Orientation])
|
||||
/Child.PreferredSize[Orientation];
|
||||
{$ENDIF}
|
||||
CurOffset:=Child.PreferredSize[Orientation]
|
||||
-Child.MinimumSize[Orientation];
|
||||
if (Factor.Offset=0) or (Factor.Scale<CurScale) then begin
|
||||
@ -626,8 +635,17 @@ var
|
||||
|
||||
crsHomogenousChildResize:
|
||||
begin
|
||||
{$IFDEF CPU64}
|
||||
{$NOTE remove this workaround, when comiler bug fixed}
|
||||
if Child.MinimumSize[Orientation]=0 then
|
||||
CurScale:=0
|
||||
else
|
||||
CurScale:=double(Child.MinimumSize[Orientation])
|
||||
/Child.PreferredSize[Orientation];
|
||||
{$ELSE}
|
||||
CurScale:=double(Child.MinimumSize[Orientation])
|
||||
/Child.PreferredSize[Orientation];
|
||||
{$ENDIF}
|
||||
CurOffset:=Child.PreferredSize[Orientation]
|
||||
-Child.MinimumSize[Orientation];
|
||||
if (Factor.Offset=0) or (Factor.Offset>CurOffset) then begin
|
||||
|
||||
@ -1099,10 +1099,10 @@ procedure MergeSort(List: TFPList; const OnCompare: TListSortCompare);
|
||||
var
|
||||
MergeList: PPointer;
|
||||
|
||||
procedure Merge(Pos1, Pos2, Pos3: integer);
|
||||
procedure Merge(Pos1, Pos2, Pos3: PtrInt);
|
||||
// merge two sorted arrays
|
||||
// the first array ranges Pos1..Pos2-1, the second ranges Pos2..Pos3
|
||||
var Src1Pos,Src2Pos,DestPos,cmp,a:integer;
|
||||
var Src1Pos,Src2Pos,DestPos,cmp,a:PtrInt;
|
||||
begin
|
||||
while (Pos3>=Pos2) and (OnCompare(List[Pos2-1],List[Pos3])<=0) do
|
||||
dec(Pos3);
|
||||
@ -1130,7 +1130,7 @@ var
|
||||
List[a]:=MergeList[a];
|
||||
end;
|
||||
|
||||
procedure Sort(StartPos, EndPos: integer);
|
||||
procedure Sort(StartPos, EndPos: PtrInt);
|
||||
// sort an interval in List. Use MergeList as work space.
|
||||
var
|
||||
cmp, mid: integer;
|
||||
@ -1163,7 +1163,7 @@ procedure MergeSort(List: TStrings; const OnCompare: TStringsSortCompare);
|
||||
var
|
||||
MergeList: PAnsiString;
|
||||
|
||||
procedure Merge(Pos1, Pos2, Pos3: integer);
|
||||
procedure Merge(Pos1, Pos2, Pos3: PtrInt);
|
||||
// merge two sorted arrays
|
||||
// the first array ranges Pos1..Pos2-1, the second ranges Pos2..Pos3
|
||||
var Src1Pos,Src2Pos,DestPos,cmp,a:integer;
|
||||
@ -1194,7 +1194,7 @@ var
|
||||
List[a]:=MergeList[a];
|
||||
end;
|
||||
|
||||
procedure Sort(StartPos, EndPos: integer);
|
||||
procedure Sort(StartPos, EndPos: PtrInt);
|
||||
// sort an interval in List. Use MergeList as work space.
|
||||
var
|
||||
cmp, mid: integer;
|
||||
@ -1218,7 +1218,7 @@ var
|
||||
|
||||
var
|
||||
CurSize: PtrInt;
|
||||
i: Integer;
|
||||
i: PtrInt;
|
||||
begin
|
||||
if (List=nil) or (List.Count<=1) then exit;
|
||||
CurSize:=PtrInt(List.Count)*SizeOf(Pointer);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user