codetools: clean up

git-svn-id: trunk@29912 -
This commit is contained in:
mattias 2011-03-19 16:24:08 +00:00
parent 5a667e33d6
commit f00e8050b6
2 changed files with 9 additions and 8 deletions

View File

@ -506,7 +506,7 @@ var
begin begin
Result:=false; Result:=false;
MethodIsCompatible:=false; MethodIsCompatible:=false;
IdentIsmethod:=false; IdentIsMethod:=false;
MethodIsPublished:=false; MethodIsPublished:=false;
ActivateGlobalWriteLock; ActivateGlobalWriteLock;
FreeAndNil(SearchedExprList); FreeAndNil(SearchedExprList);
@ -518,9 +518,9 @@ begin
Params.SetIdentifier(Self,@UpperMethodName[1],nil); Params.SetIdentifier(Self,@UpperMethodName[1],nil);
Params.Flags:=[fdfSearchInAncestors]; Params.Flags:=[fdfSearchInAncestors];
if FindIdentifierInContext(Params) then begin if FindIdentifierInContext(Params) then begin
IdentIsmethod:=(Params.NewNode.Desc=ctnProcedure); IdentIsMethod:=(Params.NewNode.Desc=ctnProcedure);
MethodIsPublished:=(Params.NewNode.Parent.Desc=ctnClassPublished); MethodIsPublished:=(Params.NewNode.Parent.Desc=ctnClassPublished);
if IdentIsmethod and MethodIsPublished then begin if IdentIsMethod and MethodIsPublished then begin
// published method with same name found // published method with same name found
FoundContext:=CreateFindContext(Params); FoundContext:=CreateFindContext(Params);
// -> test for compatibility // -> test for compatibility
@ -530,6 +530,7 @@ begin
if not CreateExprListFromMethodTypeData(TypeData,Params,SearchedExprList) if not CreateExprListFromMethodTypeData(TypeData,Params,SearchedExprList)
then then
exit(false); exit(false);
debugln(['TEventsCodeTool.PublishedMethodExists SearchedExprList=[',SearchedExprList.AsString,']']);
// create compatibility list // create compatibility list
CompListSize:=SizeOf(TTypeCompatibility)*SearchedExprList.Count; CompListSize:=SizeOf(TTypeCompatibility)*SearchedExprList.Count;
if CompListSize>0 then begin if CompListSize>0 then begin

View File

@ -7801,7 +7801,7 @@ begin
ParamCompatibility:=IsCompatible(TargetExprParamList.Items[i], ParamCompatibility:=IsCompatible(TargetExprParamList.Items[i],
SourceExprType,Params); SourceExprType,Params);
{ $IFDEF ShowExprEval} { $IFDEF ShowExprEval}
DebugLn('[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',ExprTypeToString(TargetExprParamList.Items[i]),' ',TypeCompatibilityNames[ParamCompatibility]); DebugLn(['[TFindDeclarationTool.IsParamNodeListCompatibleToExprList] B ',i,' Source=[',ExprTypeToString(SourceExprType),'] Target=[',ExprTypeToString(TargetExprParamList.Items[i]),'] Result=',TypeCompatibilityNames[ParamCompatibility]]);
{ $ENDIF} { $ENDIF}
if CompatibilityList<>nil then if CompatibilityList<>nil then
CompatibilityList[i]:=ParamCompatibility; CompatibilityList[i]:=ParamCompatibility;