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/StringArray.cs

    r4068 r4722  
    7070    }
    7171
     72    [StorableConstructor]
     73    protected StringArray(bool deserializing) : base(deserializing) { }
     74    protected StringArray(StringArray original, Cloner cloner)
     75      : base(original, cloner) {
     76      this.array = (string[])original.array.Clone();
     77      this.readOnly = original.readOnly;
     78    }
    7279    public StringArray() {
    7380      array = new string[0];
     
    8996
    9097    public override IDeepCloneable Clone(Cloner cloner) {
    91       StringArray clone = new StringArray();
    92       cloner.RegisterClonedObject(this, clone);
    93       clone.array = (string[])array.Clone();
    94       clone.readOnly = readOnly;
    95       return clone;
     98      return new StringArray(this, cloner);
    9699    }
    97100
Note: See TracChangeset for help on using the changeset viewer.