IDE: code observer: empty class sections: ignore first published class section, bug #13633

git-svn-id: trunk@19750 -
This commit is contained in:
mattias 2009-05-01 18:33:43 +00:00
parent d3391736dc
commit c62f7d1f75

View File

@ -1028,12 +1028,18 @@ begin
if (cefcUnsortedClassMembers in ObserverCats) if (cefcUnsortedClassMembers in ObserverCats)
then then
CheckUnsortedClassMembers(CodeNode); CheckUnsortedClassMembers(CodeNode);
if (cefcEmptyClassSections in ObserverCats) and if (cefcEmptyClassSections in ObserverCats)
(CodeNode.FirstChild=nil) and and (CodeNode.FirstChild=nil) then
((CodeNode.Desc <> ctnClassPublished) or (CodeNode.PriorBrother<>nil)) then
begin begin
// empty class section if (CodeNode.Desc=ctnClassPublished)
AddCodeNode(cefcEmptyClassSections,CodeNode); and ((CodeNode.PriorBrother=nil)
or (not (CodeNode.PriorBrother.Desc in AllClassBaseSections)))
then begin
// the first section can be empty
end else begin
// empty class section
AddCodeNode(cefcEmptyClassSections,CodeNode);
end;
end; end;
end; end;