From 8971baa42b0971d44685204d09e6c2d767f33bd7 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Tue, 14 Feb 2012 13:48:10 -0800 Subject: [PATCH] Fix silly bug in ConstExpr::GetConstant() with enum types. (They would be incorrectly matched as int8 types.) --- expr.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/expr.cpp b/expr.cpp index 0d46c211..6810fa87 100644 --- a/expr.cpp +++ b/expr.cpp @@ -5113,8 +5113,7 @@ ConstExpr::GetConstant(const Type *type) const { else return LLVMInt8Vector(iv); } - else if (type == AtomicType::UniformUInt8 || type == AtomicType::VaryingUInt8 || - dynamic_cast(type) != NULL) { + else if (type == AtomicType::UniformUInt8 || type == AtomicType::VaryingUInt8) { uint8_t uiv[ISPC_MAX_NVEC]; AsUInt8(uiv, type->IsVaryingType()); if (type->IsUniformType()) @@ -5130,8 +5129,7 @@ ConstExpr::GetConstant(const Type *type) const { else return LLVMInt16Vector(iv); } - else if (type == AtomicType::UniformUInt16 || type == AtomicType::VaryingUInt16 || - dynamic_cast(type) != NULL) { + else if (type == AtomicType::UniformUInt16 || type == AtomicType::VaryingUInt16) { uint16_t uiv[ISPC_MAX_NVEC]; AsUInt16(uiv, type->IsVaryingType()); if (type->IsUniformType())