Ignore:
Timestamp:
01/12/16 10:42:58 (5 years ago)
Author:
gkronber
Message:

#1966: fixed various problems: bugs in cloning, bugs in persistence, method names, various minor improvements of source code for readability.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs

    r13461 r13497  
    2121
    2222using System;
     23using System.Diagnostics;
    2324using HeuristicLab.Problems.BinPacking.Interfaces;
    2425using HeuristicLab.Core;
     
    148149
    149150    public int CompareTo(object obj) {
    150       if (obj.GetType() == this.GetType())
    151         return this.CompareTo((CuboidPackingShape)obj);
    152       else return 0;
     151      var other = (CuboidPackingShape)obj;
     152      if (other != null) return CompareTo(other);
     153      else throw new ArgumentException(string.Format("Cannot compare with object {0}", obj), "obj");
    153154    }
    154155
Note: See TracChangeset for help on using the changeset viewer.