codetools: fixed uninitialized value

git-svn-id: trunk@30691 -
This commit is contained in:
mattias 2011-05-12 11:06:13 +00:00
parent fe9fa77307
commit 4ec34d9f52
2 changed files with 6 additions and 5 deletions

View File

@ -460,7 +460,7 @@ function TChangeDeclarationTool.ApplyParamListTransactions(
var
t: TChangeParamListTransactions;
InsertCode: String;
InsertPos: Integer;
InsertPos: Integer; // behind the last kept parameter
ReplaceStartPos: Integer;
ReplaceEndPos: Integer;
LastChgPos: integer;
@ -601,6 +601,7 @@ var
// ToDo: delete space in front
ReplaceStartPos:=aParam.GetFirstPos;
end;
// extend the deletion range
ReplaceEndPos:=aParam.GetLastPos(true);
// ToDo: delete space behind
end else begin

View File

@ -91,7 +91,7 @@ type
iliHasParamList,
iliIsReadOnlyValid,
iliIsReadOnly,
iliAreHintModifiersValid,
iliHintModifiersValid,
iliIsDeprecated,
iliIsPlatform,
iliIsExperimental,
@ -2812,8 +2812,9 @@ function TIdentifierListItem.GetHintModifiers: TPascalHintModifiers;
var
ANode: TCodeTreeNode;
begin
if not (iliAreHintModifiersValid in Flags) then begin
Include(Flags,iliAreHintModifiersValid);
Result:=[];
if not (iliHintModifiersValid in Flags) then begin
Include(Flags,iliHintModifiersValid);
ANode:=Node;
if ANode<>nil then begin
Result:=Tool.GetHintModifiers(ANode);
@ -2824,7 +2825,6 @@ begin
if phmExperimental in Result then Include(Flags,iliIsExperimental);
end;
end else begin
Result:=[];
if iliIsDeprecated in Flags then Include(Result,phmDeprecated);
if iliIsPlatform in Flags then Include(Result,phmPlatform);
if iliIsLibrary in Flags then Include(Result,phmLibrary);