Fixed hashCode

This commit is contained in:
michael 2015-02-28 13:58:09 +01:00
parent 1cce72cd0a
commit 951a623930

View File

@ -100,6 +100,9 @@ public class ShaderKey extends AssetKey<Shader> {
int hash = 7; int hash = 7;
hash = 41 * hash + name.hashCode(); hash = 41 * hash + name.hashCode();
hash = 41 * hash + shaderName.get(Shader.ShaderType.Fragment).hashCode(); hash = 41 * hash + shaderName.get(Shader.ShaderType.Fragment).hashCode();
hash = shaderName.get(Shader.ShaderType.Geometry) == null ? hash : 41 * hash + shaderName.get(Shader.ShaderType.Geometry).hashCode();
hash = shaderName.get(Shader.ShaderType.TessellationControl) == null ? hash : 41 * hash + shaderName.get(Shader.ShaderType.TessellationControl).hashCode();
hash = shaderName.get(Shader.ShaderType.TessellationEvaluation) == null ? hash : 41 * hash + shaderName.get(Shader.ShaderType.TessellationEvaluation).hashCode();
hash = 41 * hash + (defines != null ? defines.hashCode() : 0); hash = 41 * hash + (defines != null ? defines.hashCode() : 0);
cachedHashedCode = hash; cachedHashedCode = hash;
} }