3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-28 23:17:57 +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:
Krystine Sherwin 2025-03-14 14:08:14 +13:00
parent dac2bb7d4d
commit 091e9488fe
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -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;