mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-20 07:36:39 +00:00
rtlil: Design::top_module() can be const
Since it doesn't change anything and is just a lookup.
This commit is contained in:
parent
dac2bb7d4d
commit
091e9488fe
|
@ -938,7 +938,7 @@ const RTLIL::Module *RTLIL::Design::module(const RTLIL::IdString& name) const
|
|||
return modules_.count(name) ? modules_.at(name) : NULL;
|
||||
}
|
||||
|
||||
RTLIL::Module *RTLIL::Design::top_module()
|
||||
RTLIL::Module *RTLIL::Design::top_module() const
|
||||
{
|
||||
RTLIL::Module *module = nullptr;
|
||||
int module_count = 0;
|
||||
|
|
|
@ -1246,7 +1246,7 @@ struct RTLIL::Design
|
|||
RTLIL::ObjRange<RTLIL::Module*> modules();
|
||||
RTLIL::Module *module(const RTLIL::IdString &name);
|
||||
const RTLIL::Module *module(const RTLIL::IdString &name) const;
|
||||
RTLIL::Module *top_module();
|
||||
RTLIL::Module *top_module() const;
|
||||
|
||||
bool has(const RTLIL::IdString &id) const {
|
||||
return modules_.count(id) != 0;
|
||||
|
|
Loading…
Reference in a new issue