summaryrefslogtreecommitdiff
path: root/source/slang/slang-emit-spirv.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/slang-emit-spirv.cpp')
-rw-r--r--source/slang/slang-emit-spirv.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/slang/slang-emit-spirv.cpp b/source/slang/slang-emit-spirv.cpp
index a3051fadb..10adb9708 100644
--- a/source/slang/slang-emit-spirv.cpp
+++ b/source/slang/slang-emit-spirv.cpp
@@ -2806,11 +2806,7 @@ struct SPIRVEmitContext
SpvWord baseId = 0;
// Only used in debug build, but we don't want a warning/error for an unused initialized variable
- if (auto ptrLikeType = as<IRPointerLikeType>(base->getDataType()))
- {
- baseId = getID(ensureInst(base));
- }
- else if (auto ptrType = as<IRPtrTypeBase>(base->getDataType()))
+ if (as<IRPointerLikeType>(base->getDataType()) || as<IRPtrTypeBase>(base->getDataType()))
{
baseId = getID(ensureInst(base));
}