Browse Source

* add const to 64bit seeks

peter 20 years ago
parent
commit
7867c168b8
1 changed files with 11 additions and 8 deletions
  1. 11 8
      rtl/objpas/classes/streams.inc

+ 11 - 8
rtl/objpas/classes/streams.inc

@@ -22,13 +22,13 @@
        Result:=Seek(0,soCurrent);
        Result:=Seek(0,soCurrent);
     end;
     end;
 
 
-  procedure TStream.SetPosition(Pos: Int64);
+  procedure TStream.SetPosition(const Pos: Int64);
 
 
     begin
     begin
        Seek(pos,soBeginning);
        Seek(pos,soBeginning);
     end;
     end;
 
 
-  procedure TStream.SetSize64(NewSize: Int64);
+  procedure TStream.SetSize64(const NewSize: Int64);
 
 
     begin
     begin
       // Required because can't use overloaded functions in properties
       // Required because can't use overloaded functions in properties
@@ -53,7 +53,7 @@
     // As wel as possible read-ony streams !!
     // As wel as possible read-ony streams !!
     end;
     end;
 
 
-  procedure TStream.SetSize(NewSize: Int64);
+  procedure TStream.SetSize(const NewSize: Int64);
 
 
     begin
     begin
       // Backwards compatibility that calls the longint SetSize
       // Backwards compatibility that calls the longint SetSize
@@ -66,7 +66,7 @@
   function TStream.Seek(Offset: Longint; Origin: Word): Longint;
   function TStream.Seek(Offset: Longint; Origin: Word): Longint;
 
 
     type
     type
-      TSeek64 = function(offset:Int64;Origin:TSeekorigin):Int64 of object;
+      TSeek64 = function(const offset:Int64;Origin:TSeekorigin):Int64 of object;
     var
     var
       CurrSeek,
       CurrSeek,
       TStreamSeek : TSeek64;
       TStreamSeek : TSeek64;
@@ -92,7 +92,7 @@
        raise EStreamError.CreateFmt(SSeekNotImplemented,[ClassName]);
        raise EStreamError.CreateFmt(SSeekNotImplemented,[ClassName]);
     end;
     end;
 
 
-  function TStream.Seek(Offset: Int64; Origin: TSeekorigin): Int64;
+  function TStream.Seek(const Offset: Int64; Origin: TSeekorigin): Int64;
 
 
     begin
     begin
       // Backwards compatibility that calls the longint Seek
       // Backwards compatibility that calls the longint Seek
@@ -431,14 +431,14 @@ begin
 end;
 end;
 
 
 
 
-Procedure THandleStream.SetSize(NewSize: Int64);
+Procedure THandleStream.SetSize(const NewSize: Int64);
 
 
 begin
 begin
   FileTruncate(FHandle,NewSize);
   FileTruncate(FHandle,NewSize);
 end;
 end;
 
 
 
 
-function THandleStream.Seek(Offset: Int64; Origin: TSeekOrigin): Int64;
+function THandleStream.Seek(const Offset: Int64; Origin: TSeekOrigin): Int64;
 
 
 begin
 begin
   Result:=FileSeek(FHandle,Offset,ord(Origin));
   Result:=FileSeek(FHandle,Offset,ord(Origin));
@@ -811,7 +811,10 @@ end;
 
 
 {
 {
   $Log$
   $Log$
-  Revision 1.8  2005-02-14 17:13:31  peter
+  Revision 1.9  2005-03-25 20:07:43  peter
+    * add const to 64bit seeks
+
+  Revision 1.8  2005/02/14 17:13:31  peter
     * truncate log
     * truncate log
 
 
   Revision 1.7  2005/01/20 16:37:57  peter
   Revision 1.7  2005/01/20 16:37:57  peter