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.TestFunctions/3.3/SingleObjectiveTestFunctionProblem.cs

    r3221 r3303  
    252252    private void InitializeOperators() {
    253253      operators = new List<IOperator>();
    254       if (ApplicationManager.Manager != null) operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
     254      operators.AddRange(ApplicationManager.Manager.GetInstances<IRealVectorOperator>().Cast<IOperator>());
    255255      UpdateMoveEvaluators();
    256256      ParameterizeOperators();
     
    265265    }
    266266    private void UpdateMoveEvaluators() {
    267       if (ApplicationManager.Manager != null) {
    268         foreach (ISingleObjectiveTestFunctionMoveEvaluator op in Operators.OfType<ISingleObjectiveTestFunctionMoveEvaluator>().ToList())
    269           operators.Remove(op);
    270         foreach (ISingleObjectiveTestFunctionMoveEvaluator op in ApplicationManager.Manager.GetInstances<ISingleObjectiveTestFunctionMoveEvaluator>())
    271           if (op.EvaluatorType == Evaluator.GetType()) {
    272             operators.Add(op);
    273           }
    274         ParameterizeOperators();
    275         OnOperatorsChanged();
    276       }
     267      foreach (ISingleObjectiveTestFunctionMoveEvaluator op in Operators.OfType<ISingleObjectiveTestFunctionMoveEvaluator>().ToList())
     268        operators.Remove(op);
     269      foreach (ISingleObjectiveTestFunctionMoveEvaluator op in ApplicationManager.Manager.GetInstances<ISingleObjectiveTestFunctionMoveEvaluator>())
     270        if (op.EvaluatorType == Evaluator.GetType()) {
     271          operators.Add(op);
     272        }
     273      ParameterizeOperators();
     274      OnOperatorsChanged();
    277275    }
    278276    private void ParameterizeSolutionCreator() {
Note: See TracChangeset for help on using the changeset viewer.