* Fix compilation with 64bit
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2532 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
a621ab87c6
commit
d15ea3e106
@ -44,3 +44,6 @@
|
|||||||
{$ifdef Windows}
|
{$ifdef Windows}
|
||||||
{$define EnableThreadSupport}
|
{$define EnableThreadSupport}
|
||||||
{$endif}
|
{$endif}
|
||||||
|
{$ifdef CPU64}
|
||||||
|
{$define PACKARRAYPASCAL}
|
||||||
|
{$endif}
|
||||||
|
@ -2416,8 +2416,11 @@ type
|
|||||||
//lcl
|
//lcl
|
||||||
procedure LoadPanningCursors;
|
procedure LoadPanningCursors;
|
||||||
function MakeNewNode: PVirtualNode;
|
function MakeNewNode: PVirtualNode;
|
||||||
function PackArrayPascal(TheArray: TNodeArray; Count: Integer): Integer;
|
{$ifdef PACKARRAYPASCAL}
|
||||||
|
function PackArray(const TheArray: TNodeArray; Count: Integer): Integer;
|
||||||
|
{$else}
|
||||||
function PackArray(TheArray: TNodeArray; Count: Integer): Integer;
|
function PackArray(TheArray: TNodeArray; Count: Integer): Integer;
|
||||||
|
{$endif}
|
||||||
procedure PrepareBitmaps(NeedButtons, NeedLines: Boolean);
|
procedure PrepareBitmaps(NeedButtons, NeedLines: Boolean);
|
||||||
procedure SetAlignment(const Value: TAlignment);
|
procedure SetAlignment(const Value: TAlignment);
|
||||||
procedure SetAnimationDuration(const Value: Cardinal);
|
procedure SetAnimationDuration(const Value: Cardinal);
|
||||||
@ -4895,6 +4898,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
{$ifdef CPU64}
|
||||||
|
|
||||||
|
function HasMMX: Boolean;
|
||||||
|
begin
|
||||||
|
Result := True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
{$else}
|
||||||
|
|
||||||
function HasMMX: Boolean;
|
function HasMMX: Boolean;
|
||||||
|
|
||||||
@ -4928,7 +4939,7 @@ asm
|
|||||||
@1:
|
@1:
|
||||||
POP EBX
|
POP EBX
|
||||||
end;
|
end;
|
||||||
|
{$endif}
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
{$ifdef EnablePrint}
|
{$ifdef EnablePrint}
|
||||||
procedure PrtStretchDrawDIB(Canvas: TCanvas; DestRect: TRect; ABitmap: TBitmap);
|
procedure PrtStretchDrawDIB(Canvas: TCanvas; DestRect: TRect; ABitmap: TBitmap);
|
||||||
@ -13152,27 +13163,42 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TBaseVirtualTree.PackArrayPascal(TheArray: TNodeArray; Count: Integer): Integer;
|
{$ifdef PACKARRAYPASCAL}
|
||||||
|
|
||||||
|
function TBaseVirtualTree.PackArray(const TheArray: TNodeArray; Count: Integer): Integer;
|
||||||
var
|
var
|
||||||
i, l: Integer;
|
Source, Dest: ^PVirtualNode;
|
||||||
|
ConstOne: PtrInt;
|
||||||
begin
|
begin
|
||||||
//todo_lcl Remove l var and use Result instead. See the differences
|
Source := Pointer(TheArray);
|
||||||
Result := -1;
|
ConstOne := 1;
|
||||||
|
Result := 0;
|
||||||
|
// Do the fastest scan possible to find the first entry
|
||||||
|
while (Count <> 0) and {not Odd(NativeInt(Source^))} (PtrInt(Source^) and ConstOne = 0) do
|
||||||
|
begin
|
||||||
|
Inc(Result);
|
||||||
|
Inc(Source);
|
||||||
|
Dec(Count);
|
||||||
|
end;
|
||||||
|
|
||||||
if Count = 0 then
|
if Count <> 0 then
|
||||||
Exit;
|
begin
|
||||||
|
Dest := Source;
|
||||||
l := 0;
|
repeat
|
||||||
for i := 0 to Count - 1 do begin
|
// Skip odd entries
|
||||||
if vsSelected in TheArray[i]^.States then begin
|
if {not Odd(NativeInt(Source^))} PtrInt(Source^) and ConstOne = 0 then
|
||||||
TheArray[l] := TheArray[i];
|
begin
|
||||||
Inc(l);
|
Dest^ := Source^;
|
||||||
|
Inc(Result);
|
||||||
|
Inc(Dest);
|
||||||
|
end;
|
||||||
|
Inc(Source); // Point to the next entry
|
||||||
|
Dec(Count);
|
||||||
|
until Count = 0;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
Result := l; // return length
|
{$else}
|
||||||
end;
|
|
||||||
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
@ -13234,6 +13260,8 @@ asm
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{$IMPLICITEXCEPTIONS ON}
|
{$IMPLICITEXCEPTIONS ON}
|
||||||
|
|
||||||
|
{$endif}
|
||||||
//----------------------------------------------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
procedure TBaseVirtualTree.PrepareBitmaps(NeedButtons, NeedLines: Boolean);
|
procedure TBaseVirtualTree.PrepareBitmaps(NeedButtons, NeedLines: Boolean);
|
||||||
|
@ -198,7 +198,7 @@ begin
|
|||||||
// to start a new edit operation if the last one is still in progress. So we post us a special message and
|
// to start a new edit operation if the last one is still in progress. So we post us a special message and
|
||||||
// in the message handler we then can start editing the new node. This works because the posted message
|
// in the message handler we then can start editing the new node. This works because the posted message
|
||||||
// is first executed *after* this event and the message, which triggered it is finished.
|
// is first executed *after* this event and the message, which triggered it is finished.
|
||||||
PostMessage(Self.Handle, WM_STARTEDITING, Integer(Node), 0);
|
PostMessage(Self.Handle, WM_STARTEDITING, PtrInt(Node), 0);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user