THRIFT-1485 Performance: pass large and/or refcounted arguments as "const"
Patch: Jens Geyer
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1228965 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/delphi/src/Thrift.Stream.pas b/lib/delphi/src/Thrift.Stream.pas
index a02677e..81d5d2a 100644
--- a/lib/delphi/src/Thrift.Stream.pas
+++ b/lib/delphi/src/Thrift.Stream.pas
@@ -68,7 +68,7 @@
function IsOpen: Boolean; override;
function ToArray: TBytes; override;
public
- constructor Create( AStream: TStream; AOwnsStream : Boolean);
+ constructor Create( const AStream: TStream; AOwnsStream : Boolean);
destructor Destroy; override;
end;
@@ -84,7 +84,7 @@
function IsOpen: Boolean; override;
function ToArray: TBytes; override;
public
- constructor Create( AStream: IStream);
+ constructor Create( const AStream: IStream);
end;
implementation
@@ -96,7 +96,7 @@
FStream := nil;
end;
-constructor TThriftStreamAdapterCOM.Create(AStream: IStream);
+constructor TThriftStreamAdapterCOM.Create( const AStream: IStream);
begin
FStream := AStream;
end;
@@ -219,7 +219,7 @@
FOwnsStream := False;
end;
-constructor TThriftStreamAdapterDelphi.Create(AStream: TStream; AOwnsStream: Boolean);
+constructor TThriftStreamAdapterDelphi.Create( const AStream: TStream; AOwnsStream: Boolean);
begin
FStream := AStream;
FOwnsStream := AOwnsStream;