mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-14 09:59:20 +02:00
FpDebug: clean up char compare (don't use set of char
for single char
) !310
This commit is contained in:
parent
0e438a9ef5
commit
06ecb6ff9d
@ -3268,9 +3268,9 @@ end;
|
||||
procedure TFpValueDwarfSet.SetAsString(AValue: AnsiString);
|
||||
type
|
||||
TCharSet = set of char;
|
||||
function CheckInChar(var p: PChar; c: TCharSet): Boolean;
|
||||
function CheckAndConsumeChar(var p: PChar; c: Char): Boolean;
|
||||
begin
|
||||
Result := p^ in c;
|
||||
Result := p^ = c;
|
||||
if Result then
|
||||
inc(p)
|
||||
else
|
||||
@ -3313,7 +3313,7 @@ begin
|
||||
|
||||
p := Pchar(AValue);
|
||||
SkipSpaces(p);
|
||||
if not CheckInChar(p, ['[']) then
|
||||
if not CheckAndConsumeChar(p, '[') then
|
||||
exit;
|
||||
|
||||
SkipSpaces(p);
|
||||
@ -3352,7 +3352,7 @@ begin
|
||||
SkipSpaces(p);
|
||||
if p^ = ']' then
|
||||
break;
|
||||
if not CheckInChar(p, [',']) then
|
||||
if not CheckAndConsumeChar(p, ',') then
|
||||
exit;
|
||||
SkipSpaces(p);
|
||||
end;
|
||||
@ -3392,7 +3392,7 @@ begin
|
||||
SkipSpaces(p);
|
||||
if p^ = ']' then
|
||||
break;
|
||||
if not CheckInChar(p, [',']) then
|
||||
if not CheckAndConsumeChar(p, ',') then
|
||||
exit;
|
||||
SkipSpaces(p);
|
||||
end;
|
||||
@ -3400,10 +3400,10 @@ begin
|
||||
end;
|
||||
|
||||
end;
|
||||
if not CheckInChar(p, [']']) then
|
||||
if not CheckAndConsumeChar(p, ']') then
|
||||
exit;
|
||||
SkipSpaces(p);
|
||||
if not CheckInChar(p, [#0]) then
|
||||
if not CheckAndConsumeChar(p, #0) then
|
||||
exit;
|
||||
|
||||
// we got the value
|
||||
|
Loading…
Reference in New Issue
Block a user