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

View File

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