mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 11:30:25 +02:00
* add const to 64bit seeks
This commit is contained in:
parent
e59c1f74a2
commit
7867c168b8
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user