Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 01:56:04 (13 years ago)
Author:
swagner
Message:

Merged cloning refactoring branch back into trunk (#922)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources

  • trunk/sources/HeuristicLab.Data/3.3/PercentValue.cs

    r4068 r4722  
    2828  [StorableClass]
    2929  public class PercentValue : DoubleValue {
     30    [StorableConstructor]
     31    protected PercentValue(bool deserializing) : base(deserializing) { }
     32    protected PercentValue(PercentValue original, Cloner cloner)
     33      : base(original, cloner) {
     34    }
    3035    public PercentValue() : base() { }
    3136    public PercentValue(double value) : base(value) { }
    3237
    3338    public override IDeepCloneable Clone(Cloner cloner) {
    34       PercentValue clone = new PercentValue(value);
    35       cloner.RegisterClonedObject(this, clone);
    36       clone.readOnly = readOnly;
    37       return clone;
     39      return new PercentValue(this, cloner);
    3840    }
    3941
Note: See TracChangeset for help on using the changeset viewer.