aboutsummaryrefslogtreecommitdiffstats
path: root/gowin/cells.cc
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2022-08-10 18:58:22 +0100
committergatecat <gatecat@ds0.me>2022-08-10 18:58:22 +0100
commitc60fb94b6c45ca74632e972995555170063b3a03 (patch)
treeb6bc6fe3cecc6962e12e61b9febb5c85e06960ed /gowin/cells.cc
parenta20d21bd135aceb9155eaee714488d1d76c60898 (diff)
downloadnextpnr-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.cc5
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;