mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 01:57:57 +02:00
IDE: Recognize warning msgs case-insensitively. Eliminate a PChar->String conversion.
This commit is contained in:
parent
2d30372b6e
commit
24c3a3a248
@ -1565,14 +1565,12 @@ end;
|
||||
function TIDEFPCParser.CheckForUnspecificStdErr(p: PChar): boolean;
|
||||
var
|
||||
MsgLine: TMessageLine;
|
||||
s: string;
|
||||
begin
|
||||
if not fMsgIsStdErr then exit(false);
|
||||
Result:=true;
|
||||
MsgLine:=CreateMsgLine;
|
||||
MsgLine.SubTool:=SubToolFPC;
|
||||
s:=p;
|
||||
if Pos('warning',s)>0 then
|
||||
if FindSubStrI('warning',p)<>nil then
|
||||
MsgLine.Urgency:=mluWarning
|
||||
else
|
||||
MsgLine.Urgency:=mluError;
|
||||
|
@ -114,10 +114,8 @@ begin
|
||||
if (SubStr='') or (p=nil) then exit;
|
||||
s:=PChar(SubStr);
|
||||
while p^<>#0 do begin
|
||||
if (UpChars[p^]=UpChars[s^]) and CompStrI(SubStr,p) then begin
|
||||
Result:=p;
|
||||
exit;
|
||||
end;
|
||||
if (UpChars[p^]=UpChars[s^]) and CompStrI(SubStr,p) then
|
||||
exit(p);
|
||||
inc(p);
|
||||
end;
|
||||
end;
|
||||
@ -151,10 +149,8 @@ begin
|
||||
Negated:=false;
|
||||
while p^ in ['0'..'9'] do begin
|
||||
i:=i*10+ord(p^)-ord('0');
|
||||
if (i>High(Result)) then begin
|
||||
Result:=Default;
|
||||
exit;
|
||||
end;
|
||||
if (i>High(Result)) then
|
||||
exit(Default);
|
||||
inc(p);
|
||||
end;
|
||||
Result:=i;
|
||||
|
Loading…
Reference in New Issue
Block a user