Skip to content

Commit 3167767

Browse files
committed
dbSta: replace serial if with switch for dbToSta for dbIoType
Signed-off-by: Matt Liberty <[email protected]>
1 parent 52011cb commit 3167767

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/dbSta/src/dbNetwork.cc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3210,17 +3210,18 @@ PortDirection* dbNetwork::dbToSta(const dbSigType& sig_type,
32103210
if (sig_type == dbSigType::GROUND) {
32113211
return PortDirection::ground();
32123212
}
3213-
if (io_type == dbIoType::INPUT) {
3214-
return PortDirection::input();
3215-
}
3216-
if (io_type == dbIoType::OUTPUT) {
3217-
return PortDirection::output();
3218-
}
3219-
if (io_type == dbIoType::INOUT) {
3220-
return PortDirection::bidirect();
3221-
}
3222-
if (io_type == dbIoType::FEEDTHRU) {
3223-
return PortDirection::bidirect();
3213+
switch (io_type.getValue()) {
3214+
case dbIoType::INPUT:
3215+
return PortDirection::input();
3216+
3217+
case dbIoType::OUTPUT:
3218+
return PortDirection::output();
3219+
3220+
case dbIoType::INOUT:
3221+
return PortDirection::bidirect();
3222+
3223+
case dbIoType::FEEDTHRU:
3224+
return PortDirection::bidirect();
32243225
}
32253226
logger_->critical(ORD, 2008, "unknown master term type");
32263227
return PortDirection::bidirect();

0 commit comments

Comments
 (0)