mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:09:25 +02:00
* just realized that AnsiStrPas is entirely unnecessary, because typecasting a
pchar to ansistring performs exactly the same thing :) git-svn-id: trunk@30056 -
This commit is contained in:
parent
9d1c9a2a6a
commit
547e20f1a2
@ -109,17 +109,6 @@ begin
|
||||
{$endif windows}
|
||||
end;
|
||||
|
||||
function AnsiStrPas(S: PChar): AnsiString;
|
||||
var
|
||||
Res: AnsiString;
|
||||
Len: LongInt;
|
||||
begin
|
||||
Len := StrLen(S);
|
||||
SetLength(Res, Len);
|
||||
Move(S^, Res[1], Len);
|
||||
AnsiStrPas := Res;
|
||||
end;
|
||||
|
||||
constructor TGDBController.Init;
|
||||
begin
|
||||
inherited Init;
|
||||
@ -317,7 +306,7 @@ begin
|
||||
if GDB.ResultRecord.Success then
|
||||
PrintCommand:=GDB.ResultRecord.Parameters['value'].AsString
|
||||
else
|
||||
PrintCommand:=AnsiStrPas(GetError);
|
||||
PrintCommand:=AnsiString(GetError);
|
||||
end;
|
||||
|
||||
const
|
||||
@ -330,7 +319,7 @@ begin
|
||||
if GDB.ResultRecord.Success then
|
||||
PrintFormattedCommand:=GDB.ResultRecord.Parameters['value'].AsString
|
||||
else
|
||||
PrintFormattedCommand:=AnsiStrPas(GetError);
|
||||
PrintFormattedCommand:=AnsiString(GetError);
|
||||
end;
|
||||
|
||||
function TGDBController.BreakpointInsert(const location: string; BreakpointFlags: TBreakpointFlags): LongInt;
|
||||
|
@ -177,17 +177,6 @@ begin
|
||||
{$endif win32}
|
||||
end;
|
||||
|
||||
function AnsiStrPas(S: PChar): AnsiString;
|
||||
var
|
||||
Res: AnsiString;
|
||||
Len: LongInt;
|
||||
begin
|
||||
Len := StrLen(S);
|
||||
SetLength(Res, Len);
|
||||
Move(S^, Res[1], Len);
|
||||
AnsiStrPas := Res;
|
||||
end;
|
||||
|
||||
constructor TGDBController.Init;
|
||||
begin
|
||||
inherited init;
|
||||
@ -484,9 +473,9 @@ begin
|
||||
while p^ in [' ',#9] do
|
||||
inc(p);
|
||||
if assigned(p) then
|
||||
InternalGetValue:=AnsiStrPas(p)
|
||||
InternalGetValue:=AnsiString(p)
|
||||
else
|
||||
InternalGetValue:=AnsiStrPas(GetError);
|
||||
InternalGetValue:=AnsiString(GetError);
|
||||
if assigned(p3) then
|
||||
p3^:=#10;
|
||||
got_error:=false;
|
||||
|
Loading…
Reference in New Issue
Block a user