* Code cleanup

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@308 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2008-01-02 20:25:57 +00:00
parent 7be94078d0
commit 9b31b7f638

View File

@ -287,16 +287,6 @@ type
Result: Integer;
end;
// The next two message records are not declared in Delphi 6 and lower.
TWMPrint = packed record
Msg: Cardinal;
DC: HDC;
Flags: Cardinal;
Result: Integer;
end;
TWMPrintClient = TWMPrint;
TLMContextMenu = TLMMouse;
// Be careful when adding new states as this might change the size of the type which in turn
@ -3553,7 +3543,7 @@ type
procedure EnumerateFormats(TreeClass: TVirtualTreeClass; const Formats: TStrings); overload;
function FindFormat(FormatString: string): PClipboardFormatListEntry; overload;
function FindFormat(FormatString: string; var Fmt: Word): TVirtualTreeClass; overload;
function FindFormat(Fmt: Word; var Description: string): TVirtualTreeClass; overload;
function FindFormat(Fmt: Word; out Description: string): TVirtualTreeClass; overload;
end;
var
@ -3756,7 +3746,7 @@ end;
//----------------------------------------------------------------------------------------------------------------------
function TClipboardFormatList.FindFormat(Fmt: Word; var Description: string): TVirtualTreeClass;
function TClipboardFormatList.FindFormat(Fmt: Word; out Description: string): TVirtualTreeClass;
var
I: Integer;
@ -3968,9 +3958,9 @@ begin
J := R;
P := TheArray[(L + R) shr 1];
repeat
while Cardinal(TheArray[I]) < Cardinal(P) do
while PtrUInt(TheArray[I]) < PtrUInt(P) do
Inc(I);
while Cardinal(TheArray[J]) > Cardinal(P) do
while PtrUInt(TheArray[J]) > PtrUInt(P) do
Dec(J);
if I <= J then
begin
@ -4423,7 +4413,7 @@ end;
//----------------------------------------------------------------------------------------------------------------------
function GetBitmapBitsFromDeviceContext(DC: HDC; var Width, Height: Integer): Pointer;
function GetBitmapBitsFromDeviceContext(DC: HDC; out Width, Height: Integer): Pointer;
// Helper function used to retrieve the bitmap selected into the given device context. If there is a bitmap then
// the function will return a pointer to its bits otherwise nil is returned.
@ -4504,7 +4494,7 @@ begin
if Height > 0 then // bottom-up DIB
Row := Height - Row - 1;
// Return DWORD aligned address of the requested scanline.
Integer(Result) := Integer(Bits) + Row * ((Width * 32 + 31) and not 31) div 8;
PtrInt(Result) := PtrInt(Bits) + Row * ((Width * 32 + 31) and not 31) div 8;
end;
//----------------------------------------------------------------------------------------------------------------------
@ -14138,8 +14128,6 @@ var
begin
Logger.EnterMethod([lcDrag],'DoDragMsg');
with Self do
begin
S := ADragObject;
Formats := nil;
@ -14217,7 +14205,6 @@ begin
end;
end;
end;
end;
Logger.ExitMethod([lcDrag],'DoDragMsg');
end;
@ -29981,7 +29968,7 @@ begin
// Create HTML table based on the tree structure. To simplify formatting we use styles defined in a small CSS area.
Buffer.Add('<style type="text/css">');
Buffer.AddnewLine;
Buffer.AddNewLine;
WriteStyle('default', Font);
Buffer.AddNewLine;
WriteStyle('header', FHeader.Font);