3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-06-07 06:33:24 +00:00

Use selection helpers

Catch more uses of selection constructor without assigning a design.
This commit is contained in:
Krystine Sherwin 2025-03-14 14:08:13 +13:00
parent a67b57bd64
commit dac2bb7d4d
No known key found for this signature in database
23 changed files with 84 additions and 78 deletions

View file

@ -1295,7 +1295,7 @@ struct RTLIL::Design
}
bool full_selection() const {
return selection_stack.back().full_selection;
return selection().full_selection;
}
template<typename T1> bool selected(T1 *module) const {
@ -1308,14 +1308,14 @@ struct RTLIL::Design
template<typename T1> void select(T1 *module) {
if (selection_stack.size() > 0) {
RTLIL::Selection &sel = selection_stack.back();
RTLIL::Selection &sel = selection();
sel.select(module);
}
}
template<typename T1, typename T2> void select(T1 *module, T2 *member) {
if (selection_stack.size() > 0) {
RTLIL::Selection &sel = selection_stack.back();
RTLIL::Selection &sel = selection();
sel.select(module, member);
}
}