浏览代码

Fix unused local var warning when DXASSERT is off.

Tex Riddell 7 年之前
父节点
当前提交
53bb89f6d8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lib/HLSL/HLMatrixLowerPass.cpp

+ 1 - 1
lib/HLSL/HLMatrixLowerPass.cpp

@@ -1289,7 +1289,7 @@ void HLMatrixLowerPass::TranslateMatMajorCast(Value *matVal,
     Type *castTy = GetMatrixInfo(castInst->getType(), castCol, castRow);
     Type *castTy = GetMatrixInfo(castInst->getType(), castCol, castRow);
     unsigned srcCol, srcRow;
     unsigned srcCol, srcRow;
     Type *srcTy = GetMatrixInfo(matVal->getType(), srcCol, srcRow);
     Type *srcTy = GetMatrixInfo(matVal->getType(), srcCol, srcRow);
-    DXASSERT(srcTy == castTy, "type must match");
+    DXASSERT_LOCALVAR((void)(srcTy && castTy), srcTy == castTy, "type must match");
     DXASSERT(castCol == srcRow && castRow == srcCol, "col row must match");
     DXASSERT(castCol == srcRow && castRow == srcCol, "col row must match");
     col = srcCol;
     col = srcCol;
     row = srcRow;
     row = srcRow;