interfaces, prevent strings to be copied

This commit is contained in:
Basile Burg 2016-11-30 10:16:35 +01:00
parent 102407898a
commit b7afbbe0ba
No known key found for this signature in database
GPG Key ID: 1868039F415CB8CF
2 changed files with 6 additions and 6 deletions

View File

@ -159,8 +159,8 @@ type
function SingleServiceName: string;
function documentCount: Integer;
function getDocument(index: Integer): TCESynMemo;
function findDocument(fname: string): TCESynMemo;
procedure openDocument(fname: string);
function findDocument(const fname: string): TCESynMemo;
procedure openDocument(const fname: string);
function closeDocument(index: Integer): boolean;
function closeDocument(doc: TCESynMemo): boolean;
public
@ -474,7 +474,7 @@ begin
exit(TCESynMemo(pageControl.Pages[index].Controls[0]));
end;
function TCEEditorWidget.findDocument(fname: string): TCESynMemo;
function TCEEditorWidget.findDocument(const fname: string): TCESynMemo;
var
i: Integer;
begin
@ -487,7 +487,7 @@ begin
result := nil;
end;
procedure TCEEditorWidget.openDocument(fname: string);
procedure TCEEditorWidget.openDocument(const fname: string);
var
doc: TCESynMemo;
begin

View File

@ -271,9 +271,9 @@ type
// returns the nth document.
function getDocument(index: Integer): TCESynMemo;
// returns true if the document matching aFilename is already opened.
function findDocument(fname: string): TCESynMemo;
function findDocument(const fname: string): TCESynMemo;
// opens or set the focus on the document matching aFilename.
procedure openDocument(fname: string);
procedure openDocument(const fname: string);
// closes the nth document.
function closeDocument(index: Integer): boolean;
// closes a particular document.