mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-10 19:35:58 +02:00
codetools: fixed remving space in front of const
git-svn-id: trunk@14539 -
This commit is contained in:
parent
3c69d6a067
commit
ebcd336655
@ -268,16 +268,17 @@ begin
|
||||
repeat
|
||||
ReadRawNextCAtom(CType,p,CurAtomStart);
|
||||
if CurAtomStart>length(CType) then break;
|
||||
//DebugLn(['TH2PasTool.ConvertSimpleCTypeToPascalType Atom=',copy(CType,CurAtomStart,p-CurAtomStart)]);
|
||||
if (p-CurAtomStart=5)
|
||||
and CompareMem(PChar('const'),@CType[CurAtomStart],5) then begin
|
||||
// remove 'const' and one space
|
||||
if (CurAtomStart>1) and (CType[CurAtomStart]=' ') then
|
||||
if (CurAtomStart>1) and (CType[CurAtomStart-1]=' ') then
|
||||
dec(CurAtomStart)
|
||||
else if (p<=length(CType)) and (CType[p]=' ') then
|
||||
inc(p);
|
||||
CType:=copy(CType,1,CurAtomStart-1)+copy(CType,p,length(CType));
|
||||
p:=CurAtomStart;
|
||||
DebugLn(['TH2PasTool.ConvertSimpleCTypeToPascalType CType="',CType,'"']);
|
||||
//DebugLn(['TH2PasTool.ConvertSimpleCTypeToPascalType CType="',CType,'"']);
|
||||
end;
|
||||
until false;
|
||||
Result:=PredefinedCTypes[CType];
|
||||
|
Loading…
Reference in New Issue
Block a user