From 8c251bbdfbd496302b42d6b47e3d3ff28046c0a0 Mon Sep 17 00:00:00 2001 From: Bart <9132501-flyingsheep@users.noreply.gitlab.com> Date: Wed, 2 Feb 2022 13:57:38 +0100 Subject: [PATCH] LCL: Use const for parameters. Patch by Alexey Torgashin. Issue #39617. --- lcl/forms.pp | 4 ++-- lcl/include/application.inc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lcl/forms.pp b/lcl/forms.pp index f01053116a..72a269cb45 100644 --- a/lcl/forms.pp +++ b/lcl/forms.pp @@ -1610,8 +1610,8 @@ type procedure IntfThemeOptionChange(AThemeServices: TThemeServices; AOption: TThemeOption); function IsRightToLeft: Boolean; - function IsRTLLang(ALang: string): Boolean; - function Direction(ALang: string): TBiDiMode; + function IsRTLLang(const ALang: string): Boolean; + function Direction(const ALang: string): TBiDiMode; public // on key down procedure DoArrowKey(AControl: TWinControl; var Key: Word; Shift: TShiftState); diff --git a/lcl/include/application.inc b/lcl/include/application.inc index f7f9169a7f..49f3e00c25 100644 --- a/lcl/include/application.inc +++ b/lcl/include/application.inc @@ -2391,7 +2391,7 @@ begin if Assigned(FOnActionUpdate) then FOnActionUpdate(TheAction, Result); end; -function TApplication.IsRTLLang(ALang: String): Boolean; +function TApplication.IsRTLLang(const ALang: String): Boolean; var lng : String; p : word; @@ -2436,7 +2436,7 @@ begin ; end; -function TApplication.Direction(ALang: String): TBiDiMode; +function TApplication.Direction(const ALang: String): TBiDiMode; const BidiModeMap: array[Boolean] of TBiDiMode = (bdLeftToRight, bdRightToLeft); begin