chelper: fix enum writting as const for all in once mode
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
parent
5efd49f60b
commit
2c90d92b2e
@ -451,6 +451,15 @@ begin
|
||||
cnv.wr.Section:=lastsec;
|
||||
if lastsec<>'' then cnv.wr.IncIdent;
|
||||
|
||||
//hack, based on knowledge of how enums writting works
|
||||
if (ent is TEnumType) or ((ent is TTypeDef) and (TTypeDef(ent).origintype is TEnumType)) then
|
||||
begin
|
||||
if cfg.EnumsAsConst and (cnv.wr.Section='type') then begin
|
||||
cnv.wr.DecIdent;
|
||||
cnv.wr.Section:='';
|
||||
end;
|
||||
end;
|
||||
|
||||
cnv.WriteCtoPas(ent, p.Comments, t);
|
||||
|
||||
lastsec:=cnv.wr.Section;
|
||||
|
Loading…
Reference in New Issue
Block a user