* Patch from Luiz Americo to use Const string params where possible

git-svn-id: trunk@15664 -
This commit is contained in:
michael 2010-07-30 09:08:51 +00:00
parent 4d2786d238
commit f4c00b4e26

View File

@ -80,7 +80,7 @@ type
FIdent: string; FIdent: string;
FValue: string; FValue: string;
public public
constructor Create(AIdent, AValue: string); constructor Create(const AIdent, AValue: string);
property Ident: string read FIdent write FIdent; property Ident: string read FIdent write FIdent;
property Value: string read FValue write FValue; property Value: string read FValue write FValue;
end; end;
@ -88,7 +88,7 @@ type
TIniFileKeyList = class(TList) TIniFileKeyList = class(TList)
private private
function GetItem(Index: integer): TIniFileKey; function GetItem(Index: integer): TIniFileKey;
function KeyByName(AName: string; CaseSensitive : Boolean): TIniFileKey; function KeyByName(const AName: string; CaseSensitive : Boolean): TIniFileKey;
public public
destructor Destroy; override; destructor Destroy; override;
procedure Clear; override; procedure Clear; override;
@ -101,7 +101,7 @@ type
FKeyList: TIniFileKeyList; FKeyList: TIniFileKeyList;
public public
Function Empty : Boolean; Function Empty : Boolean;
constructor Create(AName: string); constructor Create(const AName: string);
destructor Destroy; override; destructor Destroy; override;
property Name: string read FName; property Name: string read FName;
property KeyList: TIniFileKeyList read FKeyList; property KeyList: TIniFileKeyList read FKeyList;
@ -110,7 +110,7 @@ type
TIniFileSectionList = class(TList) TIniFileSectionList = class(TList)
private private
function GetItem(Index: integer): TIniFileSection; function GetItem(Index: integer): TIniFileSection;
function SectionByName(AName: string; CaseSensitive : Boolean): TIniFileSection; function SectionByName(const AName: string; CaseSensitive : Boolean): TIniFileSection;
public public
destructor Destroy; override; destructor Destroy; override;
procedure Clear;override; procedure Clear;override;
@ -218,7 +218,7 @@ begin
Result := '0'; Result := '0';
end; end;
function IsComment(AString: string): boolean; function IsComment(const AString: string): boolean;
begin begin
Result := False; Result := False;
if AString > '' then if AString > '' then
@ -308,7 +308,7 @@ end;
{ TIniFileKey } { TIniFileKey }
constructor TIniFileKey.Create(AIdent, AValue: string); constructor TIniFileKey.Create(const AIdent, AValue: string);
begin begin
FIdent := AIdent; FIdent := AIdent;
FValue := AValue; FValue := AValue;
@ -323,7 +323,7 @@ begin
Result := TIniFileKey(inherited Items[Index]); Result := TIniFileKey(inherited Items[Index]);
end; end;
function TIniFileKeyList.KeyByName(AName: string; CaseSensitive : Boolean): TIniFileKey; function TIniFileKeyList.KeyByName(const AName: string; CaseSensitive : Boolean): TIniFileKey;
var var
i: integer; i: integer;
begin begin
@ -379,7 +379,7 @@ end;
{ TIniFileSection } { TIniFileSection }
constructor TIniFileSection.Create(AName: string); constructor TIniFileSection.Create(const AName: string);
begin begin
FName := AName; FName := AName;
FKeyList := TIniFileKeyList.Create; FKeyList := TIniFileKeyList.Create;
@ -399,7 +399,7 @@ begin
Result := TIniFileSection(inherited Items[Index]); Result := TIniFileSection(inherited Items[Index]);
end; end;
function TIniFileSectionList.SectionByName(AName: string; CaseSensitive : Boolean): TIniFileSection; function TIniFileSectionList.SectionByName(const AName: string; CaseSensitive : Boolean): TIniFileSection;
var var
i: integer; i: integer;
begin begin