Changeset 13497 for branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs
- Timestamp:
- 01/12/16 10:42:58 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BinPacking/HeuristicLab.Problems.BinPacking/3.3/Shapes/CuboidPackingShape.cs
r13461 r13497 21 21 22 22 using System; 23 using System.Diagnostics; 23 24 using HeuristicLab.Problems.BinPacking.Interfaces; 24 25 using HeuristicLab.Core; … … 148 149 149 150 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"); 153 154 } 154 155
Note: See TracChangeset
for help on using the changeset viewer.