From c60fb94b6c45ca74632e972995555170063b3a03 Mon Sep 17 00:00:00 2001 From: gatecat Date: Wed, 10 Aug 2022 18:58:22 +0100 Subject: refactor: Use IdString::in instead of || chains Signed-off-by: gatecat --- ecp5/cells.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ecp5/cells.h') diff --git a/ecp5/cells.h b/ecp5/cells.h index 185b19ce..c79bf8cd 100644 --- a/ecp5/cells.h +++ b/ecp5/cells.h @@ -47,15 +47,13 @@ inline bool is_l6mux(const BaseCtx *ctx, const CellInfo *cell) { return cell->ty inline bool is_iologic_input_cell(const BaseCtx *ctx, const CellInfo *cell) { - return cell->type == id_IDDRX1F || cell->type == id_IDDRX2F || cell->type == id_IDDR71B || - cell->type == id_IDDRX2DQA || + return cell->type.in(id_IDDRX1F, id_IDDRX2F, id_IDDR71B, id_IDDRX2DQA) || (cell->type == id_TRELLIS_FF && bool_or_default(cell->attrs, id_syn_useioff) && (str_or_default(cell->attrs, id_ioff_dir, "") != "output")); } inline bool is_iologic_output_cell(const BaseCtx *ctx, const CellInfo *cell) { - return cell->type == id_ODDRX1F || cell->type == id_ODDRX2F || cell->type == id_ODDR71B || - cell->type == id_ODDRX2DQA || cell->type == id_ODDRX2DQSB || cell->type == id_OSHX2A || + return cell->type.in(id_ODDRX1F, id_ODDRX2F, id_ODDR71B, id_ODDRX2DQA, id_ODDRX2DQSB, id_OSHX2A) || (cell->type == id_TRELLIS_FF && bool_or_default(cell->attrs, id_syn_useioff) && (str_or_default(cell->attrs, id_ioff_dir, "") != "input")); } -- cgit v1.2.3