/lcl/buttons.pp has the following routines:
function GetDefaultButtonIcon(idButton: Integer;
ScalePercent: Integer): TCustomBitmap;
var
ResName: string;
begin
Result := nil;
if (idButton < Low(BitBtnResNames)) or (idButton > High(BitBtnResNames)) then
Exit;
if BitBtnResNames[idButton] = '' then
Exit;
Result := GetDefaultGlyph(BitBtnResNames[idButton], ScalePercent);
end;
procedure LoadGlyphFromResource(AGlyph: TButtonGlyph; idButton: Integer);
var
I: Integer;
begin
if not((Low(TButtonImage)<=idButton) and (idButton<=High(TButtonImage))) then
Exit;
AGlyph.LCLGlyphName := BitBtnResNames[idButton];
end;
The variables are declared but never used.
The following patch removes them:
diff --git a/lcl/buttons.pp b/lcl/buttons.pp
index c441f1494a..55d9ae8988 100644
--- a/lcl/buttons.pp
+++ b/lcl/buttons.pp
@@ -575,8 +575,6 @@ end;
function GetDefaultButtonIcon(idButton: Integer;
ScalePercent: Integer): TCustomBitmap;
-var
- ResName: string;
begin
Result := nil;
if (idButton < Low(BitBtnResNames)) or (idButton > High(BitBtnResNames)) then
@@ -631,8 +629,6 @@ begin
end;
procedure LoadGlyphFromResource(AGlyph: TButtonGlyph; idButton: Integer);
-var
- I: Integer;
begin
if not((Low(TButtonImage)<=idButton) and (idButton<=High(TButtonImage))) then
Exit;