31 Jan
2023
31 Jan
'23
12:18 p.m.
Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.h:
};
+static inline char hlsl_regset_name(enum hlsl_regset regset) +{ + switch (regset) + { + case HLSL_REGSET_S: + return 's'; + case HLSL_REGSET_T: + return 't'; + case HLSL_REGSET_U: + return 'u'; + case HLSL_REGSET_NUMERIC: + case HLSL_REGSET_VOID: + vkd3d_unreachable(); + break; You should not need this `break`. The point of `vkd3d_unreachable()` is precisely to free you from the need to handle control flow in such a situation. Also, you're just before the end of the `switch` block anyway.
-- https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/66#note_22451