diff --git a/ide/lazbuild.lpr b/ide/lazbuild.lpr index 823ea4d24f..0ec494c000 100644 --- a/ide/lazbuild.lpr +++ b/ide/lazbuild.lpr @@ -773,9 +773,8 @@ var UnitOutputDirectory: String; TargetExeName: String; TargetExeDir: String; - NewBuildMode: TProjectBuildMode; CompilePolicy: TPackageUpdatePolicy; - i,c: Integer; + i,MatchCount: Integer; Note: String; NeedBuildAllFlag: Boolean; SubResult: TModalResult; @@ -943,21 +942,20 @@ begin begin CurResult := true; - c := 0; // Matches counter - + MatchCount := 0; ModeMask := TMask.Create(BuildModeOverride,false); for i := 0 to Project1.BuildModes.Count-1 do begin if ModeMask.Matches(Project1.BuildModes[i].Identifier) then begin - inc(c); + inc(MatchCount); Project1.ActiveBuildMode := Project1.BuildModes[i]; CurResult := CurResult and StartBuilding; end; end; ModeMask.Free; - if c=0 then // No matches + if MatchCount=0 then // No matches begin debugln([Format(lisERRORInvalidBuildMode, [BuildModeOverride])]); if ConsoleVerbosity>=0 then