codetools: less hints

git-svn-id: trunk@64683 -
This commit is contained in:
mattias 2021-02-28 08:51:52 +00:00
parent 388532a797
commit ac82b9e9bc
2 changed files with 12 additions and 12 deletions

View File

@ -252,7 +252,7 @@ begin
if phpWithResultType in Attr then begin if phpWithResultType in Attr then begin
Len:=ord(TypeData^.ParamList[Offset]); Len:=ord(TypeData^.ParamList[Offset]);
inc(Offset); inc(Offset);
SetLength(ResultType,Len); SetLength(ResultType{%H-},Len);
Move(TypeData^.ParamList[Offset],ResultType[1],Len); Move(TypeData^.ParamList[Offset],ResultType[1],Len);
inc(Offset,Len); inc(Offset,Len);
if (ResultType<>'') and (IsIdentStartChar[ResultType[1]]) then // e.g. $void if (ResultType<>'') and (IsIdentStartChar[ResultType[1]]) then // e.g. $void
@ -1254,7 +1254,7 @@ begin
// skip ParamName // skip ParamName
Len:=ord(TypeData^.ParamList[Offset]); Len:=ord(TypeData^.ParamList[Offset]);
{$IFDEF VerboseTypeData} {$IFDEF VerboseTypeData}
SetLength(CurParamName,Len); SetLength(CurParamName{%H-},Len);
if Len>0 then if Len>0 then
Move(TypeData^.ParamList[Offset+1],CurParamName[1],Len); Move(TypeData^.ParamList[Offset+1],CurParamName[1],Len);
{$ENDIF} {$ENDIF}
@ -1263,7 +1263,7 @@ begin
// read ParamType // read ParamType
Len:=ord(TypeData^.ParamList[Offset]); Len:=ord(TypeData^.ParamList[Offset]);
inc(Offset); inc(Offset);
SetLength(CurTypeIdentifier,Len); SetLength(CurTypeIdentifier{%H-},Len);
if CurTypeIdentifier<>'' then if CurTypeIdentifier<>'' then
Move(TypeData^.ParamList[Offset],CurTypeIdentifier[1],Len); Move(TypeData^.ParamList[Offset],CurTypeIdentifier[1],Len);
inc(Offset,Len); inc(Offset,Len);

View File

@ -776,7 +776,7 @@ var
while (p<EndP) and (p^ in ['0'..'9','A'..'Z']) do inc(p); while (p<EndP) and (p^ in ['0'..'9','A'..'Z']) do inc(p);
if (StartP=p) or (p^<>';') then if (StartP=p) or (p^<>';') then
e('unit id expected, but found "'+dbgstr(p^)+'"'); e('unit id expected, but found "'+dbgstr(p^)+'"');
SetLength(UnitID,p-StartP); SetLength(UnitID{%H-},p-StartP);
Move(StartP^,UnitID[1],length(UnitID)); Move(StartP^,UnitID[1],length(UnitID));
inc(p); // skip semicolon inc(p); // skip semicolon
@ -787,7 +787,7 @@ var
while (p<EndP) and (p^ in ['0'..'9']) do inc(p); while (p<EndP) and (p^ in ['0'..'9']) do inc(p);
if (StartP=p) or (p^<>';') then if (StartP=p) or (p^<>';') then
e('unit use count expected, but found "'+dbgstr(p^)+'"'); e('unit use count expected, but found "'+dbgstr(p^)+'"');
SetLength(s,p-StartP); SetLength(s{%H-},p-StartP);
Move(StartP^,s[1],length(s)); Move(StartP^,s[1],length(s));
UseCount:=StrToInt64Def(s,0); UseCount:=StrToInt64Def(s,0);
inc(p); // skip semicolon inc(p); // skip semicolon
@ -798,7 +798,7 @@ var
while (p<EndP) and (p^ in ['0'..'9','A'..'Z','a'..'z','_','.']) do inc(p); while (p<EndP) and (p^ in ['0'..'9','A'..'Z','a'..'z','_','.']) do inc(p);
if (StartP=p) or (p^<>';') then if (StartP=p) or (p^<>';') then
e('unit name expected, but found "'+dbgstr(p^)+'"'); e('unit name expected, but found "'+dbgstr(p^)+'"');
SetLength(CurUnitName,p-StartP); SetLength(CurUnitName{%H-},p-StartP);
Move(StartP^,CurUnitName[1],length(CurUnitName)); Move(StartP^,CurUnitName[1],length(CurUnitName));
inc(p); // skip semicolon inc(p); // skip semicolon
@ -807,7 +807,7 @@ var
while (p<EndP) and (not (p^ in [#10,#13])) do inc(p); while (p<EndP) and (not (p^ in [#10,#13])) do inc(p);
if (StartP=p) or (not (p^ in [#10,#13])) then if (StartP=p) or (not (p^ in [#10,#13])) then
e('file name expected, but found "'+dbgstr(p^)+'"'); e('file name expected, but found "'+dbgstr(p^)+'"');
SetLength(UnitFilename,p-StartP); SetLength(UnitFilename{%H-},p-StartP);
Move(StartP^,UnitFilename[1],length(UnitFilename)); Move(StartP^,UnitFilename[1],length(UnitFilename));
ReadLineEnding; ReadLineEnding;
@ -828,7 +828,7 @@ var
if (not (p^ in [#10,#13])) then if (not (p^ in [#10,#13])) then
e('identifier expected, but found "'+dbgstr(p^)+'"'); e('identifier expected, but found "'+dbgstr(p^)+'"');
if p=StartP then break; if p=StartP then break;
SetLength(Identifier,p-StartP); SetLength(Identifier{%H-},p-StartP);
Move(StartP^,Identifier[1],length(Identifier)); Move(StartP^,Identifier[1],length(Identifier));
ReadLineEnding; ReadLineEnding;
if not Skip then begin if not Skip then begin
@ -863,7 +863,7 @@ var
while (p<EndP) and (p^ in ['0'..'9','A'..'Z','a'..'z','_','.']) do inc(p); while (p<EndP) and (p^ in ['0'..'9','A'..'Z','a'..'z','_','.']) do inc(p);
if (p^<>';') then if (p^<>';') then
e('group name expected, but found "'+dbgstr(p^)+'"'); e('group name expected, but found "'+dbgstr(p^)+'"');
SetLength(GroupName,p-StartP); SetLength(GroupName{%H-},p-StartP);
if GroupName<>'' then if GroupName<>'' then
Move(StartP^,GroupName[1],length(GroupName)); Move(StartP^,GroupName[1],length(GroupName));
inc(p); // skip semicolon inc(p); // skip semicolon
@ -875,7 +875,7 @@ var
while (p<EndP) and (p^ in ['0'..'9']) do inc(p); while (p<EndP) and (p^ in ['0'..'9']) do inc(p);
if (StartP=p) or (p^<>';') then if (StartP=p) or (p^<>';') then
e('group use count expected, but found "'+dbgstr(p^)+'"'); e('group use count expected, but found "'+dbgstr(p^)+'"');
SetLength(s,p-StartP); SetLength(s{%H-},p-StartP);
Move(StartP^,s[1],length(s)); Move(StartP^,s[1],length(s));
UseCount:=StrToInt64Def(s,0); UseCount:=StrToInt64Def(s,0);
inc(p); // skip semicolon inc(p); // skip semicolon
@ -886,7 +886,7 @@ var
while (p<EndP) and (not (p^ in [#10,#13])) do inc(p); while (p<EndP) and (not (p^ in [#10,#13])) do inc(p);
if (not (p^ in [#10,#13])) then if (not (p^ in [#10,#13])) then
e('file name expected, but found "'+dbgstr(p^)+'"'); e('file name expected, but found "'+dbgstr(p^)+'"');
SetLength(GroupFilename,p-StartP); SetLength(GroupFilename{%H-},p-StartP);
if GroupFilename<>'' then if GroupFilename<>'' then
Move(StartP^,GroupFilename[1],length(GroupFilename)); Move(StartP^,GroupFilename[1],length(GroupFilename));
ReadLineEnding; ReadLineEnding;
@ -903,7 +903,7 @@ var
if (not (p^ in [#10,#13])) then if (not (p^ in [#10,#13])) then
e('unit identifier expected, but found "'+dbgstr(p^)+'"'); e('unit identifier expected, but found "'+dbgstr(p^)+'"');
if p=StartP then break; if p=StartP then break;
SetLength(UnitID,p-StartP); SetLength(UnitID{%H-},p-StartP);
Move(StartP^,UnitID[1],length(UnitID)); Move(StartP^,UnitID[1],length(UnitID));
ReadLineEnding; ReadLineEnding;