Skip to content

Commit

Permalink
Use local variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
horacekj committed Nov 2, 2024
1 parent 6e56a26 commit 5a75958
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/panel/MenuPanel.pas
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,7 @@ procedure TPanelMenu.ShowMenu(Items: string; obl_r: Integer; absoluteLeftTop: TP
/// /////////////////////////////////////////////////////////////////////////////

procedure TPanelMenu.PaintMenu(obj: TDXDraw; mouse_pos: TPoint);
var i: Integer;
Pos: TPoint;
var Pos: TPoint;
foreground, background: TColor;
str: string;
Canvas: TCanvas;
Expand Down Expand Up @@ -153,7 +152,7 @@ procedure TPanelMenu.PaintMenu(obj: TDXDraw; mouse_pos: TPoint);

Self.fselected := -1;

for i := 0 to Self.Items.cnt - 1 do
for var i: Integer := 0 to Self.Items.cnt - 1 do
begin
background := TJopColor.gray;

Expand Down Expand Up @@ -290,8 +289,7 @@ procedure TPanelMenu.Click();
/// /////////////////////////////////////////////////////////////////////////////

procedure TPanelMenu.LoadHints(fn: string);
var parsed: TStrings;
f: TextFile;
var f: TextFile;
begin
Self.Hints.Clear();

Expand All @@ -302,7 +300,7 @@ procedure TPanelMenu.LoadHints(fn: string);
Exit();
end;

parsed := TStringList.Create();
var parsed: TStrings := TStringList.Create();
try
while (not eof(f)) do
begin
Expand Down

0 comments on commit 5a75958

Please sign in to comment.