Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3603


Ignore:
Timestamp:
05/04/10 14:11:47 (14 years ago)
Author:
mkommend
Message:

corrected == operator of ConstraintOperation (ticket #996)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core/3.3/Constraints/ConstraintOperation.cs

    r3602 r3603  
    4040
    4141    [StorableConstructor]
    42     protected ConstraintOperation( bool deserializing) {
     42    protected ConstraintOperation(bool deserializing) {
    4343    }
    4444    protected ConstraintOperation(int value, string name) {
     
    6161    }
    6262    public static bool operator ==(ConstraintOperation co1, ConstraintOperation co2) {
     63      if(object.ReferenceEquals(co1,co2))
     64        return true;
     65     
     66      if((object)co1 == null || (object) co2 == null)
     67        return false;
     68
    6369      return co1.value == co2.value;
    6470    }
Note: See TracChangeset for help on using the changeset viewer.