On 4/5/22 05:47, Matteo Bruni wrote:
On Mon, Mar 28, 2022 at 10:59 AM Giovanni Mascellani gmascellani@codeweavers.com wrote:
Signed-off-by: Giovanni Mascellani gmascellani@codeweavers.com
v2:
- Renamed (it was "Abort when an unexpected type appears.")
libs/vkd3d-shader/hlsl_sm4.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/libs/vkd3d-shader/hlsl_sm4.c b/libs/vkd3d-shader/hlsl_sm4.c index fa845dc4..af5c777f 100644 --- a/libs/vkd3d-shader/hlsl_sm4.c +++ b/libs/vkd3d-shader/hlsl_sm4.c @@ -1468,7 +1468,7 @@ static void write_sm4_cast(struct hlsl_ctx *ctx, break;
default:
break;
assert(0); } break;
One option to make these asserts more descriptive is to do something like:
assert(!"Non-numeric source expression");
Perhaps, although in a case like this I don't think it's worthwhile; this assert is more for code clarity than actual runtime validation.