mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
* micro-optimization for tentryfile.getbyte() (based on patch by
J. Gareth Moreton, mantis #35406) git-svn-id: trunk@41924 -
This commit is contained in:
parent
75cdae9836
commit
55aeac44f0
@ -609,13 +609,13 @@ end;
|
|||||||
|
|
||||||
function tentryfile.getbyte:byte;
|
function tentryfile.getbyte:byte;
|
||||||
begin
|
begin
|
||||||
if entryidx+1>entry.size then
|
if entryidx>=entry.size then
|
||||||
begin
|
begin
|
||||||
error:=true;
|
error:=true;
|
||||||
result:=0;
|
result:=0;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
if bufsize-bufidx>=1 then
|
if bufidx<bufsize then
|
||||||
begin
|
begin
|
||||||
result:=pbyte(@buf[bufidx])^;
|
result:=pbyte(@buf[bufidx])^;
|
||||||
inc(bufidx);
|
inc(bufidx);
|
||||||
|
Loading…
Reference in New Issue
Block a user