[qfcc] Use const type_t * for new_horizontal_expr

It was missed in the type_t const-correctness pass.
This commit is contained in:
Bill Currie 2025-01-20 00:50:32 +09:00
parent f511bb31c5
commit 0143a2410c
3 changed files with 4 additions and 4 deletions

View file

@ -304,7 +304,7 @@ typedef struct {
typedef struct {
int op; ///< operation to perform
const expr_t *vec; ///< vector expression on which to operate
type_t *type; ///< result type
const type_t *type; ///< result type
} ex_horizontal_t;
typedef struct {
@ -669,7 +669,7 @@ const expr_t *paren_expr (const expr_t *e);
\return The new unary expression node (::ex_expr_t) if \a e1
is not an error expression, otherwise \a e1.
*/
expr_t *new_horizontal_expr (int op, const expr_t *vec, type_t *type);
expr_t *new_horizontal_expr (int op, const expr_t *vec, const type_t *type);
const expr_t *new_swizzle_expr (const expr_t *src, const char *swizzle);

View file

@ -609,7 +609,7 @@ paren_expr (const expr_t *e)
}
expr_t *
new_horizontal_expr (int op, const expr_t *vec, type_t *type)
new_horizontal_expr (int op, const expr_t *vec, const type_t *type)
{
if (vec->type == ex_error) {
return (expr_t *) vec;

View file

@ -2064,7 +2064,7 @@ expr_horizontal (sblock_t *sblock, const expr_t *e, operand_t **op)
const char *opcode = "hops";
statement_t *s;
int hop;
type_t *res_type = e->hop.type;
const type_t *res_type = e->hop.type;
auto vec_type = get_type (e->hop.vec);
switch (e->hop.op) {