Skip to content

Commit ad69c6f

Browse files
committed
Add a function-local using odb::dbMasterType for readability.
Signed-off-by: Henner Zeller <[email protected]>
1 parent 0c8b7d4 commit ad69c6f

File tree

1 file changed

+42
-40
lines changed

1 file changed

+42
-40
lines changed

src/dpl/src/infrastructure/Padding.cpp

Lines changed: 42 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -37,50 +37,52 @@ bool Padding::isPaddedType(odb::dbInst* inst) const
3737
if (inst == nullptr) {
3838
return false;
3939
}
40-
odb::dbMasterType type = inst->getMaster()->getType();
40+
41+
using odb::dbMasterType;
42+
dbMasterType type = inst->getMaster()->getType();
4143
// Use switch so if new types are added we get a compiler warning.
4244
switch (type.getValue()) {
43-
case odb::dbMasterType::CORE:
44-
case odb::dbMasterType::CORE_ANTENNACELL:
45-
case odb::dbMasterType::CORE_FEEDTHRU:
46-
case odb::dbMasterType::CORE_TIEHIGH:
47-
case odb::dbMasterType::CORE_TIELOW:
48-
case odb::dbMasterType::CORE_WELLTAP:
45+
case dbMasterType::CORE:
46+
case dbMasterType::CORE_ANTENNACELL:
47+
case dbMasterType::CORE_FEEDTHRU:
48+
case dbMasterType::CORE_TIEHIGH:
49+
case dbMasterType::CORE_TIELOW:
50+
case dbMasterType::CORE_WELLTAP:
4951
return true;
50-
case odb::dbMasterType::ENDCAP:
51-
case odb::dbMasterType::ENDCAP_PRE:
52-
case odb::dbMasterType::ENDCAP_POST:
53-
case odb::dbMasterType::ENDCAP_LEF58_RIGHTEDGE:
54-
case odb::dbMasterType::ENDCAP_LEF58_LEFTEDGE:
55-
case odb::dbMasterType::CORE_SPACER:
56-
case odb::dbMasterType::BLOCK:
57-
case odb::dbMasterType::BLOCK_BLACKBOX:
58-
case odb::dbMasterType::BLOCK_SOFT:
59-
case odb::dbMasterType::ENDCAP_TOPLEFT:
60-
case odb::dbMasterType::ENDCAP_TOPRIGHT:
61-
case odb::dbMasterType::ENDCAP_BOTTOMLEFT:
62-
case odb::dbMasterType::ENDCAP_BOTTOMRIGHT:
63-
case odb::dbMasterType::ENDCAP_LEF58_BOTTOMEDGE:
64-
case odb::dbMasterType::ENDCAP_LEF58_TOPEDGE:
65-
case odb::dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMEDGE:
66-
case odb::dbMasterType::ENDCAP_LEF58_LEFTBOTTOMEDGE:
67-
case odb::dbMasterType::ENDCAP_LEF58_RIGHTTOPEDGE:
68-
case odb::dbMasterType::ENDCAP_LEF58_LEFTTOPEDGE:
69-
case odb::dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMCORNER:
70-
case odb::dbMasterType::ENDCAP_LEF58_LEFTBOTTOMCORNER:
71-
case odb::dbMasterType::ENDCAP_LEF58_RIGHTTOPCORNER:
72-
case odb::dbMasterType::ENDCAP_LEF58_LEFTTOPCORNER:
52+
case dbMasterType::ENDCAP:
53+
case dbMasterType::ENDCAP_PRE:
54+
case dbMasterType::ENDCAP_POST:
55+
case dbMasterType::ENDCAP_LEF58_RIGHTEDGE:
56+
case dbMasterType::ENDCAP_LEF58_LEFTEDGE:
57+
case dbMasterType::CORE_SPACER:
58+
case dbMasterType::BLOCK:
59+
case dbMasterType::BLOCK_BLACKBOX:
60+
case dbMasterType::BLOCK_SOFT:
61+
case dbMasterType::ENDCAP_TOPLEFT:
62+
case dbMasterType::ENDCAP_TOPRIGHT:
63+
case dbMasterType::ENDCAP_BOTTOMLEFT:
64+
case dbMasterType::ENDCAP_BOTTOMRIGHT:
65+
case dbMasterType::ENDCAP_LEF58_BOTTOMEDGE:
66+
case dbMasterType::ENDCAP_LEF58_TOPEDGE:
67+
case dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMEDGE:
68+
case dbMasterType::ENDCAP_LEF58_LEFTBOTTOMEDGE:
69+
case dbMasterType::ENDCAP_LEF58_RIGHTTOPEDGE:
70+
case dbMasterType::ENDCAP_LEF58_LEFTTOPEDGE:
71+
case dbMasterType::ENDCAP_LEF58_RIGHTBOTTOMCORNER:
72+
case dbMasterType::ENDCAP_LEF58_LEFTBOTTOMCORNER:
73+
case dbMasterType::ENDCAP_LEF58_RIGHTTOPCORNER:
74+
case dbMasterType::ENDCAP_LEF58_LEFTTOPCORNER:
7375
// These classes are completely ignored by the placer.
74-
case odb::dbMasterType::COVER:
75-
case odb::dbMasterType::COVER_BUMP:
76-
case odb::dbMasterType::RING:
77-
case odb::dbMasterType::PAD:
78-
case odb::dbMasterType::PAD_AREAIO:
79-
case odb::dbMasterType::PAD_INPUT:
80-
case odb::dbMasterType::PAD_OUTPUT:
81-
case odb::dbMasterType::PAD_INOUT:
82-
case odb::dbMasterType::PAD_POWER:
83-
case odb::dbMasterType::PAD_SPACER:
76+
case dbMasterType::COVER:
77+
case dbMasterType::COVER_BUMP:
78+
case dbMasterType::RING:
79+
case dbMasterType::PAD:
80+
case dbMasterType::PAD_AREAIO:
81+
case dbMasterType::PAD_INPUT:
82+
case dbMasterType::PAD_OUTPUT:
83+
case dbMasterType::PAD_INOUT:
84+
case dbMasterType::PAD_POWER:
85+
case dbMasterType::PAD_SPACER:
8486
return false;
8587
}
8688
// gcc warniing

0 commit comments

Comments
 (0)