Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/12/10 01:29:35 (15 years ago)
Author:
swagner
Message:

Removed unnecessary checks if the application manager is not null (#954).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/TravelingSalesmanProblem.cs

    r3232 r3303  
    295295    private void InitializeOperators() {
    296296      operators = new List<IPermutationOperator>();
    297       if (ApplicationManager.Manager != null) operators.AddRange(ApplicationManager.Manager.GetInstances<IPermutationOperator>());
     297      operators.AddRange(ApplicationManager.Manager.GetInstances<IPermutationOperator>());
    298298      ParameterizeOperators();
    299299      UpdateMoveEvaluators();
     
    313313    }
    314314    private void UpdateMoveEvaluators() {
    315       if (ApplicationManager.Manager != null) {
    316         foreach (ITSPPathMoveEvaluator op in Operators.OfType<ITSPPathMoveEvaluator>().ToList())
    317           operators.Remove(op);
    318         foreach (ITSPPathMoveEvaluator op in ApplicationManager.Manager.GetInstances<ITSPPathMoveEvaluator>())
    319           if (op.EvaluatorType == Evaluator.GetType()) {
    320             operators.Add(op);
    321           }
    322         ParameterizeOperators();
    323         OnOperatorsChanged();
    324       }
     315      foreach (ITSPPathMoveEvaluator op in Operators.OfType<ITSPPathMoveEvaluator>().ToList())
     316        operators.Remove(op);
     317      foreach (ITSPPathMoveEvaluator op in ApplicationManager.Manager.GetInstances<ITSPPathMoveEvaluator>())
     318        if (op.EvaluatorType == Evaluator.GetType()) {
     319          operators.Add(op);
     320        }
     321      ParameterizeOperators();
     322      OnOperatorsChanged();
    325323    }
    326324    private void ParameterizeSolutionCreator() {
Note: See TracChangeset for help on using the changeset viewer.