Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/07/16 17:44:04 (8 years ago)
Author:
mkommend
Message:

#2672: Corrected cloning of online calculators (added missing base ctor calls, moved clone method, renamed other to original, and used the cloner for cloning).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineWeightedDirectionalSymmetryCalculator.cs

    r14376 r14465  
    4242    }
    4343
    44     protected OnlineWeightedDirectionalSymmetryCalculator(OnlineWeightedDirectionalSymmetryCalculator other, Cloner cloner) {
    45       n = other.n;
    46       correctSum = other.correctSum;
    47       incorrectSum = other.incorrectSum;
    48       errorState = other.errorState;
     44    protected OnlineWeightedDirectionalSymmetryCalculator(OnlineWeightedDirectionalSymmetryCalculator original, Cloner cloner)
     45      : base(original, cloner) {
     46      n = original.n;
     47      correctSum = original.correctSum;
     48      incorrectSum = original.incorrectSum;
     49      errorState = original.errorState;
     50    }
     51
     52    public override IDeepCloneable Clone(Cloner cloner) {
     53      return new OnlineWeightedDirectionalSymmetryCalculator(this, cloner);
    4954    }
    5055
     
    125130      }
    126131    }
    127 
    128     public override IDeepCloneable Clone(Cloner cloner) {
    129       return new OnlineWeightedDirectionalSymmetryCalculator(this, cloner);
    130     }
    131132  }
    132133}
Note: See TracChangeset for help on using the changeset viewer.