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:
parent
a67b57bd64
commit
dac2bb7d4d
23 changed files with 84 additions and 78 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue