diff options
author | gatecat <gatecat@ds0.me> | 2022-08-10 18:58:22 +0100 |
---|---|---|
committer | gatecat <gatecat@ds0.me> | 2022-08-10 18:58:22 +0100 |
commit | c60fb94b6c45ca74632e972995555170063b3a03 (patch) | |
tree | b6bc6fe3cecc6962e12e61b9febb5c85e06960ed /gowin/cells.cc | |
parent | a20d21bd135aceb9155eaee714488d1d76c60898 (diff) | |
download | nextpnr-c60fb94b6c45ca74632e972995555170063b3a03.tar.gz nextpnr-c60fb94b6c45ca74632e972995555170063b3a03.tar.bz2 nextpnr-c60fb94b6c45ca74632e972995555170063b3a03.zip |
refactor: Use IdString::in instead of || chains
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'gowin/cells.cc')
-rw-r--r-- | gowin/cells.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/gowin/cells.cc b/gowin/cells.cc index 0c027d38..fc5e7388 100644 --- a/gowin/cells.cc +++ b/gowin/cells.cc @@ -56,13 +56,12 @@ std::unique_ptr<CellInfo> create_generic_cell(Context *ctx, IdString type, std:: new_cell->addInput(id_CLK); new_cell->addInput(id_CE); new_cell->addInput(id_LSR); - } else if (type == id_MUX2_LUT5 || type == id_MUX2_LUT6 || type == id_MUX2_LUT7 || type == id_MUX2_LUT7 || - type == id_MUX2_LUT8) { + } else if (type.in(id_MUX2_LUT5, id_MUX2_LUT6, id_MUX2_LUT7, id_MUX2_LUT7, id_MUX2_LUT8)) { new_cell->addInput(id_I0); new_cell->addInput(id_I1); new_cell->addInput(id_SEL); new_cell->addOutput(id_OF); - } else if (type == id_IOB || type == id_IOBS) { + } else if (type.in(id_IOB, id_IOBS)) { new_cell->params[id_INPUT_USED] = 0; new_cell->params[id_OUTPUT_USED] = 0; new_cell->params[id_ENABLE_USED] = 0; |