Fix warning on windows release builds (#1350)

A persistent and occasionally confusing warning is produced on
Windows release builds because of a conditional expression that only
contains an assert. On a release build, this amounts to nothing but
a semicolon, which produces the warning.

This folds the conditional into the previously explicit assert so
it is included or excluded entirely regardless of build type.
This commit is contained in:
Greg Roth 2018-06-15 20:05:45 -06:00 коммит произвёл Lei Zhang
Родитель eb37d4ae2b
Коммит fdc414caa0
1 изменённых файлов: 1 добавлений и 2 удалений

Просмотреть файл

@ -7257,8 +7257,7 @@ void ResourceToHandle::ReplaceResourceWithHandle(Value *ResPtr,
// Remove resource Store. // Remove resource Store.
SI->eraseFromParent(); SI->eraseFromParent();
} else { } else {
if (!U->user_empty() || !isa<GEPOperator>(U)) DXASSERT(U->user_empty() && isa<GEPOperator>(U), "invalid operation on resource");
DXASSERT(0, "invalid operation on resource");
} }
} }
} }