* string -> shortstring, check zero length instead of comparing to empty string

This commit is contained in:
Michael VAN CANNEYT 2023-01-06 11:57:18 +01:00 committed by Pierre Muller
parent 924d2fd086
commit 58a1de98c5

View File

@ -123,7 +123,7 @@ Begin
End; End;
Procedure fpc_reset_typed_name_iso(var f : TypedFile;const FileName : String;Size : Longint);[Public,IOCheck, Alias:'FPC_RESET_TYPED_NAME_ISO']; compilerproc; Procedure fpc_reset_typed_name_iso(var f : TypedFile;const FileName : ShortString;Size : Longint);[Public,IOCheck, Alias:'FPC_RESET_TYPED_NAME_ISO']; compilerproc;
Begin Begin
If InOutRes <> 0 then If InOutRes <> 0 then
exit; exit;
@ -140,7 +140,7 @@ Begin
End; End;
Procedure fpc_rewrite_typed_name_iso(var f : TypedFile;const FileName : String;Size : Longint);[Public,IOCheck, Alias:'FPC_REWRITE_TYPED_NAME_ISO']; compilerproc; Procedure fpc_rewrite_typed_name_iso(var f : TypedFile;const FileName : ShortString;Size : Longint);[Public,IOCheck, Alias:'FPC_REWRITE_TYPED_NAME_ISO']; compilerproc;
Begin Begin
If InOutRes <> 0 then If InOutRes <> 0 then
exit; exit;
@ -213,10 +213,10 @@ begin
end; end;
Procedure fpc_typedfile_init_filename_iso(var t : TypedFile;nr : DWord;const filename : string);compilerproc; Procedure fpc_typedfile_init_filename_iso(var t : TypedFile;nr : DWord;const filename : shortstring);compilerproc;
begin begin
{$ifdef FPC_HAS_FEATURE_COMMANDARGS} {$ifdef FPC_HAS_FEATURE_COMMANDARGS}
if paramstr(nr)='' then if Length(paramstr(nr))=0 then
assign(t,filename) assign(t,filename)
else else
assign(t,paramstr(nr)); assign(t,paramstr(nr));