MontyTRC89 / Tomb-Editor

Tomb Editor
55 stars 15 forks source link

TE: Adapt IDeepCloneable #819

Open Raildex opened 2 months ago

Raildex commented 2 months ago

TE makes heavy use of the ICloneable interface. The ICloneable interface however does not indicate whether it makes a shallow or a deep copy of the object. Some classes do a shallow, some do a deep copy.

I propose adding a IDeepCloneable<T> interface to TombLib.Utils. that always returns a Deep Copy:

namespace TombLib.Utils
{
    public interface IDeepCloneable<T>
    {
        public T DeepClone();
    }
}