浏览代码

[libgdx] Simpler hashcode.

NathanSweet 6 年之前
父节点
当前提交
42e5222cbf
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java

+ 1 - 1
spine-libgdx/spine-libgdx/src/com/esotericsoftware/spine/Skin.java

@@ -127,7 +127,7 @@ public class Skin {
 			if (name == null) throw new IllegalArgumentException("name cannot be null.");
 			this.slotIndex = slotIndex;
 			this.name = name;
-			hashCode = 31 * (31 + name.hashCode()) + slotIndex;
+			hashCode = name.hashCode() + slotIndex * 37;
 		}
 
 		public int hashCode () {