Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
11/06/10 02:34:05 (14 years ago)
Author:
swagner
Message:

Fixed cloning bugs (#922)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Optimization/3.3/Result.cs

    r4722 r4725  
    7575    }
    7676
     77    [StorableConstructor]
     78    private Result(bool deserializing) : base(deserializing) { }
     79    private Result(Result original, Cloner cloner)
     80      : base(original, cloner) {
     81      dataType = original.dataType;
     82      value = cloner.Clone(original.value);
     83      Initialize();
     84    }
    7785    public Result()
    7886      : base("Anonymous") {
     
    102110      Initialize();
    103111    }
    104     [StorableConstructor]
    105     private Result(bool deserializing) : base(deserializing) { }
     112
    106113    [StorableHook(HookType.AfterDeserialization)]
    107114    private void AfterDeserialization() {
    108115      Initialize();
    109116    }
    110     private Result(Result original, Cloner cloner)
    111       : base(original, cloner) {
    112       value = cloner.Clone(original.value);
    113       Initialize();
    114     }
     117
    115118    public override IDeepCloneable Clone(Cloner cloner) {
    116119      return new Result(this, cloner);
Note: See TracChangeset for help on using the changeset viewer.